Re: win32 menus and popups not closing when app loses focus

On Fri, 16 Apr 2004, Owen Taylor wrote:
> > 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.
> This isn't the right way to do things. The right thing to do is to make
> GtkMenuShell able to function without keyboard and pointer grabs using
> standard focused windows.

How do you track the mouse and close the menu when the button is released
outside of the window without a grab?  The user can use alt-Tab to switch
apps while the mouse button is still pressed.  In this case, the app never
gets a mouse up event until it gets the focus again.  This is less common
than just using the keyboard, but it can happen.

Another problem is that the menu window can't take the focus away from
their parent window because the title bar on the parent window will change
color to indicate that it longer has the focus (this was a bug in gtk at
one point that has since been fixed).



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