diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-11-11 20:22:21 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-11-11 20:22:21 +0000 |
| commit | 7327b740325b0f14be780797408c5fc88d36fae4 (patch) | |
| tree | 598a205190c1c6cee72a6286ebb9cb9c78a400fe /src | |
| parent | bf9a09d387da05741be44239ade4c1ca0b3dade4 (diff) | |
Don't popup menus or activate buttons when (SHIFT/CTRL/ALT/META) + space
is pressed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2834 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Button.cxx | 7 | ||||
| -rw-r--r-- | src/Fl_Choice.cxx | 7 | ||||
| -rw-r--r-- | src/Fl_Menu_Button.cxx | 7 |
3 files changed, 12 insertions, 9 deletions
diff --git a/src/Fl_Button.cxx b/src/Fl_Button.cxx index e5da503f3..0cbf86453 100644 --- a/src/Fl_Button.cxx +++ b/src/Fl_Button.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Button.cxx,v 1.4.2.6.2.18 2002/10/10 20:08:16 easysw Exp $" +// "$Id: Fl_Button.cxx,v 1.4.2.6.2.19 2002/11/11 20:22:21 easysw Exp $" // // Button widget for the Fast Light Tool Kit (FLTK). // @@ -129,7 +129,8 @@ int Fl_Button::handle(int event) { return 1; } else return 0; case FL_KEYBOARD : - if (Fl::focus() == this && Fl::event_key() == ' ') { + if (Fl::focus() == this && Fl::event_key() == ' ' && + !(Fl::event_state() & (FL_SHIFT | FL_CTRL | FL_ALT | FL_META))) { if (type() == FL_RADIO_BUTTON && !value_) { setonly(); if (when() & FL_WHEN_CHANGED) do_callback(); @@ -155,5 +156,5 @@ Fl_Button::Fl_Button(int X, int Y, int W, int H, const char *l) } // -// End of "$Id: Fl_Button.cxx,v 1.4.2.6.2.18 2002/10/10 20:08:16 easysw Exp $". +// End of "$Id: Fl_Button.cxx,v 1.4.2.6.2.19 2002/11/11 20:22:21 easysw Exp $". // diff --git a/src/Fl_Choice.cxx b/src/Fl_Choice.cxx index e7ca7224b..f6e9f6c1b 100644 --- a/src/Fl_Choice.cxx +++ b/src/Fl_Choice.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Choice.cxx,v 1.10.2.5.2.11 2002/08/09 01:09:48 easysw Exp $" +// "$Id: Fl_Choice.cxx,v 1.10.2.5.2.12 2002/11/11 20:22:21 easysw Exp $" // // Choice widget for the Fast Light Tool Kit (FLTK). // @@ -100,7 +100,8 @@ int Fl_Choice::handle(int e) { return 1; case FL_KEYBOARD: - if (Fl::event_key() != ' ') return 0; + if (Fl::event_key() != ' ' || + (Fl::event_state() & (FL_SHIFT | FL_CTRL | FL_ALT | FL_META))) return 0; case FL_PUSH: if (Fl::visible_focus()) Fl::focus(this); Fl::event_is_click(0); @@ -129,5 +130,5 @@ int Fl_Choice::handle(int e) { } // -// End of "$Id: Fl_Choice.cxx,v 1.10.2.5.2.11 2002/08/09 01:09:48 easysw Exp $". +// End of "$Id: Fl_Choice.cxx,v 1.10.2.5.2.12 2002/11/11 20:22:21 easysw Exp $". // diff --git a/src/Fl_Menu_Button.cxx b/src/Fl_Menu_Button.cxx index 203150de2..1afbc7b39 100644 --- a/src/Fl_Menu_Button.cxx +++ b/src/Fl_Menu_Button.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Menu_Button.cxx,v 1.4.2.3.2.5 2002/09/01 22:39:33 easysw Exp $" +// "$Id: Fl_Menu_Button.cxx,v 1.4.2.3.2.6 2002/11/11 20:22:21 easysw Exp $" // // Menu button widget for the Fast Light Tool Kit (FLTK). // @@ -70,7 +70,8 @@ int Fl_Menu_Button::handle(int e) { return 1; case FL_KEYBOARD: if (!box()) return 0; - if (Fl::event_key() == ' ') { + if (Fl::event_key() == ' ' && + !(Fl::event_state() & (FL_SHIFT | FL_CTRL | FL_ALT | FL_META))) { popup(); return 1; } else return 0; @@ -94,5 +95,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.5 2002/09/01 22:39:33 easysw Exp $". +// End of "$Id: Fl_Menu_Button.cxx,v 1.4.2.3.2.6 2002/11/11 20:22:21 easysw Exp $". // |
