NotifyUngrab handling



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 ?

Felix



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