summaryrefslogtreecommitdiff
path: root/src/Fl_Menu_Window.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_Menu_Window.cxx')
-rw-r--r--src/Fl_Menu_Window.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Fl_Menu_Window.cxx b/src/Fl_Menu_Window.cxx
index f74db6ea2..aab069849 100644
--- a/src/Fl_Menu_Window.cxx
+++ b/src/Fl_Menu_Window.cxx
@@ -81,16 +81,20 @@ Fl_Menu_Window::~Fl_Menu_Window() {
// The system is also told to "grab" events and send them to this app.
extern void fl_fix_focus();
+
#ifdef WIN32
-HWND fl_capture; // for some reason we must keep forcing it back on!
+// We have to keep track of whether we have captured the mouse, since
+// MSWindows shows little respect for this... Grep for fl_capture to
+// see where and how this is used.
+HWND fl_capture;
#endif
void Fl::grab(Fl_Window& w) {
grab_ = &w;
fl_fix_focus();
#ifdef WIN32
- // this seems to have no effect...
- SetCapture(fl_capture = fl_xid(first_window()));
+ SetActiveWindow(fl_capture = fl_xid(first_window()));
+ SetCapture(fl_capture);
#else
XGrabPointer(fl_display,
fl_xid(first_window()),