The events are Python objects, either X event objects from Python Xlib, or an instance of some other Python class. The only thing required by the event system is that they have at least this attribute:
This identifies the event type, and can be any hashable object. For X
events this is some integer constants defined in Xlib.X
. For
other events this can be the event object class, a unique string, or
anything else that is useful. It must however be a hashable object,
since the type is used as an index into dictionaries.
The event
module provides a function for getting new, unique
integer event types:
Return a new unique integer event type, which does not conflict with the event types of the Xlib.
Additionally the WindowManager
uses one of these attributes to
figure out which Screen
and Client
that should take care
of the event:
Screen
managing
this client will get the event, and can then in its turn pass the event
on to the client itself.
Screen
managing the root window of this window will get the event. If the window
corresponds to a managed client, that client can also get the event.
If the event has none of the attributes or it is for an unmanaged screen it will only be passed to the global event handlers.
Go to the first, previous, next, last section, table of contents.