diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 1999-01-19 19:05:39 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 1999-01-19 19:05:39 +0000 |
| commit | b2290975d4c70e66f58fdc462d0869e9e55cd317 (patch) | |
| tree | 978ae69765d0efab8d891370746f38c52df7ca5b | |
| parent | 2832714d4c9566597b4087e97cd372b76549fbe7 (diff) | |
Fix from Bill - global shortcuts now work for the menubar as well.
git-svn-id: file:///fltk/svn/fltk/trunk@231 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | src/Fl_Menu_Bar.cxx | 7 | ||||
| -rw-r--r-- | src/Fl_Menu_global.cxx | 6 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/Fl_Menu_Bar.cxx b/src/Fl_Menu_Bar.cxx index b01e8cabb..514b2ef29 100644 --- a/src/Fl_Menu_Bar.cxx +++ b/src/Fl_Menu_Bar.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Menu_Bar.cxx,v 1.6 1999/01/13 15:45:49 mike Exp $" +// "$Id: Fl_Menu_Bar.cxx,v 1.7 1999/01/19 19:05:39 mike Exp $" // // Menu bar widget for the Fast Light Tool Kit (FLTK). // @@ -52,13 +52,12 @@ int Fl_Menu_Bar::handle(int event) { case FL_SHORTCUT: v = menu()->test_shortcut(); if (v) {picked(v); return 1;} - v = menu()->find_shortcut(); - if (v) goto J1; + if (visible_r() && (v = menu()->find_shortcut())) goto J1; return 0; } return 0; } // -// End of "$Id: Fl_Menu_Bar.cxx,v 1.6 1999/01/13 15:45:49 mike Exp $". +// End of "$Id: Fl_Menu_Bar.cxx,v 1.7 1999/01/19 19:05:39 mike Exp $". // diff --git a/src/Fl_Menu_global.cxx b/src/Fl_Menu_global.cxx index 0558669bc..e6410ecf5 100644 --- a/src/Fl_Menu_global.cxx +++ b/src/Fl_Menu_global.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Menu_global.cxx,v 1.4 1999/01/07 19:17:23 mike Exp $" +// "$Id: Fl_Menu_global.cxx,v 1.5 1999/01/19 19:05:39 mike Exp $" // // Global menu shortcut code for the Fast Light Tool Kit (FLTK). // @@ -34,7 +34,7 @@ static Fl_Menu_* the_widget; static int handler(int e) { if (e != FL_SHORTCUT || Fl::modal()) return 0; - return the_widget->test_shortcut() != 0; + return the_widget->handle(e); } void Fl_Menu_::global() { @@ -43,5 +43,5 @@ void Fl_Menu_::global() { } // -// End of "$Id: Fl_Menu_global.cxx,v 1.4 1999/01/07 19:17:23 mike Exp $". +// End of "$Id: Fl_Menu_global.cxx,v 1.5 1999/01/19 19:05:39 mike Exp $". // |
