win32 menus and popups not closing when app loses focus


I'd like to try to resolve bug #107370 -- popup windows and menus not
closing when switching apps with the keyboard, usually with Alt-Tab.  
This is something that some Windows users (including myself) do often and
it is a visible problem for those users.  I'm bringing the bug up here to
get feedback from people who normally don't look at win32 bugs.

The root of the problem is how X11 and win32 implement grabs.  On X11, 
the app grabs the mouse and keyboard when a menu is displayed, which 
guarentees that the app will not lose focus until it releases the grab 
(usually in response to a mouse up event).  On win32, there is no such 
grab -- the user is free to shift focus with the keyboard at any time.  
Even if gtk could enforce an X11-style grab, we probably wouldn't want to 
since it's not what all other win32 apps do.

The solution is probably to send an event to the grabbing window, if there
is one, when the app loses focus.  The question is which event.  One
possibility is to send a mouse up event, but that seems like the wrong
thing to do since no mouse up event has accually occurred.  If another 
event is chosen, code in gtk and elsewhere will need to be modified to 
look for the "broken grab" event and act accordingly.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]