diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-04-08 11:00:09 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-04-08 11:00:09 +0200 |
commit | 442600d1f7e11156bb8a205a2f043611fd178397 (patch) | |
tree | ba55d50578ba91be27bdac8900315a1a23ef6029 | |
parent | f39e2bc128339740591c4d53d30a319841d90df0 (diff) |
use quit_cb instead of dummy_cb
-rw-r--r-- | src/gipfel.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gipfel.cxx b/src/gipfel.cxx index 1e038d2..cd4da09 100644 --- a/src/gipfel.cxx +++ b/src/gipfel.cxx @@ -129,12 +129,11 @@ void set_values() { } void quit_cb() { + if (Fl::event() == FL_SHORTCUT && Fl::event_key() == FL_Escape) + return; // ignore Escape exit(0); } -void dummy_cb() { -} - void open_cb() { char *file = fl_file_chooser("Open File?", "*.jpg", img_file); if (file) { @@ -620,10 +619,10 @@ int main(int argc, char** argv) { Fl::scheme("plastic"); control_win = create_control_window(); - control_win->callback((Fl_Callback*) dummy_cb); + control_win->callback((Fl_Callback*) quit_cb); view_win = new Fl_Window(800, 600); - view_win->callback((Fl_Callback*) dummy_cb); + view_win->callback((Fl_Callback*) quit_cb); // The Fl_Group is used to avoid FL_DAMAGE_ALL in Fl_Scroll::position Fl_Group *g = new Fl_Group(0, 0, view_win->w(), view_win->h()); |