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
This commit is contained in:
parent
2832714d4c
commit
b2290975d4
@ -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 $".
|
||||
//
|
||||
|
@ -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 $".
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user