In this case, when selecting the event, you get a complementary pair automatically. In other words, if you are interested in one of them, you probably are interested (or should be) in the other too.
Focus In and Focus Out events.
Both of these events are selected internally with a single mask,
focus_change
, so even if you register a callback for only one,
your window will also get the other one. You should always register
a callback for both.
The server generates a focus_in
event when the keyboard focus
window changes as a result of an explicit set_input_focus
call. The window that receives this event has the keyboard focus and will
be receiving all keyboard input until it loses the focus.
Specify with:
focus_in
The server generates a focus_out
event when the keyboard focus
window changes as a result of an explicit set_input_focus
call. The
window that receives this event has lost the keyboard focus and therefore
will not be receiving any more keyboard input.
Specify with:
focus_out
Graphics Events.
These events present a special problem, as they are not selected
by the window's event_mask
attribute, but by the GC
graphics_exposure
. Also, they apply to both Windows and Pixmaps.
These callbacks are not part of the of the
Window, Pixmap or GC attributes
. They are established and de-established dynamically
as an optional parameter to the copy_area
and copy_plane
calls.
The graphics_expose
event is generated by
copy_area
or copy_plane
when the source area is not available because the region is clipped
or obscured. Specify with
graphics_expose
The server generates a no_expose
event when the source
area for a copy_area
or copy_plane
request was completely
available, and therefore the request was carried out successfully.
Specify with:
no_expose