RFC: X*IfEvent, generic events and threads

Rami Ylimäki rami.ylimaki at vincit.fi
Fri Mar 11 00:26:27 PST 2011


The documentation for predicate function used with X*IfEvent states that 
calling back to Xlib from the predicate is forbidden. This is 
inconvenient with generic events, because calling XGetEventData is 
mandatory for filtering them. However, calling XGetEventData in the 
predicate is forbidden by the documentation and also causes a deadlock 
with multithreaded clients.

Would it make sense to create new variants like X*IfGenericEvent using 
an extended predicate function that would also receive a pointer to the 
generic event data? That way event filtering could be done for generic 
events as well without violating the specification for predicates. 
Current situation is a bit annoying, because only legacy events can be 
filtered reliably.

-- Rami

More information about the xorg-devel mailing list