From 45bb73a9bf4692c68294be12a2e25a39ca3a307b Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 15 Oct 1998 14:06:16 +0000 Subject: Commited WIN32 patches from Bill Spitzak and Gustavo Hime. git-svn-id: file:///fltk/svn/fltk/trunk@11 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Menu_Window.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/Fl_Menu_Window.cxx') 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()), -- cgit v1.2.3