It's useful to have a working X server if a client holds a grab when it triggers a debugger breakpoint

Glynn Clements glynn at gclements.plus.com
Wed May 27 16:59:43 PDT 2009


Xavier Bestel wrote:

> > The main benefit of a grab in the use of menus is that you will get the next
> > event regardless of where it occurs. This is what makes the menu disappear
> > when you click elsewhere. If the application didn't grab, the menu could
> > only disappear by activating a menu item, or - assuming the application
> > supports this - by clicking elsewhere in one of the application's windows.
> 
> Just as a datapoint, AFAIK that's how Windows GUI toolkits work. They
> don't grab the whole display, thay just wait for events in their window.

Windows isn't X. On Windows menus are a distinct class of GUI object,
distinct from a Window. On X, a menu is just a window, and the
application needs to use a grab if it wants to close the menu when a
click occurs outside of the menu.

> > Any suggestions on solving this feature through other means is appreciated
> > (note that registering for events on every visible window doesn't count).
> 
> Limiting events to the application windows doesn't seem that bad.

That would mean that menus persist until you click in a window
belonging to the application which created the menu.

-- 
Glynn Clements <glynn at gclements.plus.com>



More information about the xorg mailing list