Re: NotifyUngrab handling




Felix Bellaby <felix@pooh.u-net.com> writes:

> Hi all,
> 
> I have encountered a situation in gnome-client.c where I need 
> to call gtk_ungrab_pointer and gtk_ungrab_keyboard (in order
> to avoid a deadlock when grabbing on an inaccessible widget).
> This code can cause menus to be left hanging on the screen.
> 
> This suggests that gtk+ is not responding properly to the
> NotifyUngrab mode LeaveEvents generated by gtk_ungrab_pointer.
> Since the Xserver generates ungrabs spontaneously when grab
> windows become obscured this problem could also be generating 
> hanging menus when windows are reconfigured on the desktop.
> 
> I would have thought that ungrab notifies (unlike most crossing 
> events) should be going to the event widget but instead they 
> appear to be redirected to the grab widget. Is this an oversight ? 
> 
> I would also expect the menus to respond to ungrab notifies by
> deactivating since once they lose the grab they can no longer
> rely on their usual mechanisms to deactivate them.
> 
> I had a look for code to handle ungrab notifies in gtk but 
> I could not find any. Is this a known hole in gtk+ or am I 
> missing something ?

Do you have code that demonstrates the problem? 

Offhand, I don't understand why the app needs to 
to worry about NotifyUngrab at all. (Not saying there
isn't a reason, I just don't know it.)

Currently, enter/Leave events with Notify[Un]grab are propagated
normally, Focus events (from XGrabKeybaord) are stripped to avoid
confusing how we set focus for input methods.

Regards,
                                        Owen



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