summaryrefslogtreecommitdiff
path: root/src/Fl_Menu.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2011-05-07 07:15:39 +0000
committerManolo Gouy <Manolo>2011-05-07 07:15:39 +0000
commitf9a2d65bb36acfa81174b5644b70475f09a10579 (patch)
tree8dacd1abfe3e212920c5a149eb8692c0f0f5664e /src/Fl_Menu.cxx
parent2c42334c5562e3bb4a1d6b034714ad6a32195fd9 (diff)
Fix STR #2619. An extra FL_MOVE event is sent on X11 after the menu item is selected
by the keyboard. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8641 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Menu.cxx')
-rw-r--r--src/Fl_Menu.cxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx
index 5f3f89b32..bc0f74bce 100644
--- a/src/Fl_Menu.cxx
+++ b/src/Fl_Menu.cxx
@@ -612,7 +612,7 @@ static void setitem(int m, int n) {
static int forward(int menu) { // go to next item in menu menu if possible
menustate &pp = *p;
- // Fl_Menu_Button can geberate menu=-1. This line fixes it and selectes the first item.
+ // Fl_Menu_Button can generate menu=-1. This line fixes it and selectes the first item.
if (menu==-1)
menu = 0;
menuwindow &m = *(pp.p[menu]);
@@ -729,16 +729,17 @@ int menuwindow::early_hide_handle(int e) {
}
}
break;
+ case FL_MOVE:
+#if ! (defined(WIN32) || defined(__APPLE__))
+ if (pp.state == DONE_STATE) {
+ return 1; // Fix for STR #2619
+ }
+ /* FALLTHROUGH */
+#endif
case FL_ENTER:
- case FL_MOVE:
case FL_PUSH:
case FL_DRAG:
{
-#ifdef __QNX__
- // STR 704: workaround QNX X11 bug - in QNX a FL_MOVE event is sent
- // right after FL_RELEASE...
- if (pp.state == DONE_STATE) return 1;
-#endif // __QNX__
int mx = Fl::event_x_root();
int my = Fl::event_y_root();
int item=0; int mymenu = pp.nummenus-1;