Skip to content

Commit

Permalink
Fix Fl_Menu_Button focus problems.
Browse files Browse the repository at this point in the history
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2612 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
michaelrsweet committed Sep 1, 2002
1 parent a798547 commit b700c8c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGES
@@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.0

- Fl_Menu_Button no longer responds to focus or keyboard
events when box() is FL_NO_BOX.
- FLTK convenience dialogs put the buttons in the wrong
order.
- Fl_BMP_Image didn't load 4-bit BMP files properly.
Expand Down
5 changes: 3 additions & 2 deletions src/Fl_Menu_Button.cxx
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Menu_Button.cxx,v 1.4.2.3.2.4 2002/01/01 15:11:30 easysw Exp $"
// "$Id: Fl_Menu_Button.cxx,v 1.4.2.3.2.5 2002/09/01 22:39:33 easysw Exp $"
//
// Menu button widget for the Fast Light Tool Kit (FLTK).
//
Expand Down Expand Up @@ -69,6 +69,7 @@ int Fl_Menu_Button::handle(int e) {
popup();
return 1;
case FL_KEYBOARD:
if (!box()) return 0;
if (Fl::event_key() == ' ') {
popup();
return 1;
Expand All @@ -93,5 +94,5 @@ Fl_Menu_Button::Fl_Menu_Button(int X,int Y,int W,int H,const char *l)
}

//
// End of "$Id: Fl_Menu_Button.cxx,v 1.4.2.3.2.4 2002/01/01 15:11:30 easysw Exp $".
// End of "$Id: Fl_Menu_Button.cxx,v 1.4.2.3.2.5 2002/09/01 22:39:33 easysw Exp $".
//
5 changes: 3 additions & 2 deletions test/menubar.cxx
@@ -1,5 +1,5 @@
//
// "$Id: menubar.cxx,v 1.6.2.8.2.3 2002/01/01 15:11:33 easysw Exp $"
// "$Id: menubar.cxx,v 1.6.2.8.2.4 2002/09/01 22:39:33 easysw Exp $"
//
// Menubar test program for the Fast Light Tool Kit (FLTK).
//
Expand Down Expand Up @@ -189,6 +189,7 @@ int main(int argc, char **argv) {
menus[2] = &ch;
Fl_Menu_Button mb(0,0,WIDTH,400,"&popup");
mb.type(Fl_Menu_Button::POPUP3);
mb.box(FL_NO_BOX);
mb.menu(menutable);
mb.remove(1); // delete the "File" submenu
mb.callback(test_cb);
Expand All @@ -202,5 +203,5 @@ int main(int argc, char **argv) {
}

//
// End of "$Id: menubar.cxx,v 1.6.2.8.2.3 2002/01/01 15:11:33 easysw Exp $".
// End of "$Id: menubar.cxx,v 1.6.2.8.2.4 2002/09/01 22:39:33 easysw Exp $".
//

0 comments on commit b700c8c

Please sign in to comment.