summaryrefslogtreecommitdiff
path: root/src/Fl_Menu_Window.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>1998-10-15 14:06:16 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>1998-10-15 14:06:16 +0000
commit45bb73a9bf4692c68294be12a2e25a39ca3a307b (patch)
tree97b86255a274ec6415738788c180d5528f0948d1 /src/Fl_Menu_Window.cxx
parent8b880adac62b6724c36405b173286362c386c227 (diff)
Commited WIN32 patches from Bill Spitzak and Gustavo Hime.
git-svn-id: file:///fltk/svn/fltk/trunk@11 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
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()),