LWN.net Logo

Synchronous grabs

Synchronous grabs

Posted Oct 11, 2009 23:01 UTC (Sun) by Ross (subscriber, #4065)
Parent article: LPC: 25 years of X

The article claims these are never used. That doesn't match my admitted fuzzy knowledge of the subject.

For example, I think these are the only way to implement "click to raise" on application windows in a window manager without eating the button clicks on application windows. I'm pretty sure that many window managers use it for such things and even the ICCCM says to do so (side note: can somebody please update it to cover things like this if there are known correct ways to do it).

Now I'm not saying it's a great mechanism, and it certainly isn't flexible . It would be much nicer to be able to intercept events to child windows even if they are owned by another client and replay any user-generated event to any child window and/or client.

In general I find the X11 event system to be complex and confusing: sometimes things are delivered to clients, sometimes windows, sometimes it matters what events are masked by parent windows, not to mention grabs by multiple clients (sometimes additional grabs fail silently, sometimes they generate a protocol error). Also, the use of timestamps to avoid race conditions seems kind of weak, and it's not immediately clear which situations require inspection of stamps, or what order they must be in. Things like the ICCCM could be improved to explain more of these situations, and libraries could do a better job of making it easy to do things the right way (Xlib hides some complexity poorly, and add a lot of it's own).


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds