diff options
| author | Bill Spitzak <spitzak@gmail.com> | 1999-03-03 07:47:22 +0000 |
|---|---|---|
| committer | Bill Spitzak <spitzak@gmail.com> | 1999-03-03 07:47:22 +0000 |
| commit | b32f322c12d107152f441f9554044bd5b7d67b24 (patch) | |
| tree | adb3b3ecb3ca09ff6653fc9b030be768b038b875 /src | |
| parent | fe4f5ef72c159e5f6e6023a41e5f021dd92d64f2 (diff) | |
Much better and smaller fix for the lost move events after Fl::grab()
git-svn-id: file:///fltk/svn/fltk/trunk@352 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index 7d8cb4a73..6f5a05a1f 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl.cxx,v 1.21 1999/03/03 07:40:17 bill Exp $" +// "$Id: Fl.cxx,v 1.22 1999/03/03 07:47:22 bill Exp $" // // Main event handling code for the Fast Light Tool Kit (FLTK). // @@ -418,6 +418,7 @@ int Fl::handle(int event, Fl_Window* window) case FL_DRAG: // this should not happen if enter/leave events were reported // correctly by the system, but just in case: + fl_xmousewin = window; if (pushed()) { w = pushed(); event = FL_DRAG; @@ -426,10 +427,7 @@ int Fl::handle(int event, Fl_Window* window) } else if (modal() && w != modal()) { w = 0; } - if (grab()) - w = grab(); - else - fl_xmousewin = window; + if (grab()) w = grab(); break; case FL_RELEASE: { @@ -492,11 +490,12 @@ int Fl::handle(int event, Fl_Window* window) return 0; case FL_ENTER: - if (!grab()) {fl_xmousewin = window; fl_fix_focus();} + fl_xmousewin = window; fl_fix_focus(); + fl_send_extra_move(); return 1; case FL_LEAVE: - if (!grab() && window == fl_xmousewin) {fl_xmousewin = 0; fl_fix_focus();} + if (window == fl_xmousewin) {fl_xmousewin = 0; fl_fix_focus();} return 1; default: @@ -683,5 +682,5 @@ int fl_old_shortcut(const char* s) { } // -// End of "$Id: Fl.cxx,v 1.21 1999/03/03 07:40:17 bill Exp $". +// End of "$Id: Fl.cxx,v 1.22 1999/03/03 07:47:22 bill Exp $". // |
