Name
FocusIn,FocusOut — xfocus
When Generated
FocusIn and FocusOut
events occur when the keyboard focus window changes as a result of
an XSetInputFocus() call. They are much like
EnterNotify and LeaveNotify
events except that they track the focus rather than the
pointer.
When a focus change occurs, a FocusOut
event is delivered to the old focus window and a
FocusIn event to the window which receives the
focus. In addition, windows in between these two windows in the
window hierarchy are virtually crossed and receive focus change
events, as described below. Some or all of the windows between the
window containing the pointer at the time of the focus change and
the root window also receive focus change events, as described
below.
Select With
FocusIn and FocusOut
events are selected with FocusChangeMask. They
cannot be selected separately.
XEvent Structure Name
typedef union _XEvent {
...
XFocusChangeEvent xfocus;
...
} XEvent;Event Structure
typedef struct { int type; /* FocusIn or FocusOut */ unsigned long serial; /* # of last request processed by server */ Bool send_event; /* True if this came from SendEvent request */ Display *display; /* Display the event was read from */ Window window; /* Window of event */ int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */ int detail; /* NotifyAncestor, NotifyDetailNone, * NotifyInferior, NotifyNonLinear, * NotifyNonLinearVirtual, NotifyPointer, * NotifyPointerRoot, NotifyVirtual */ } XFocusChangeEvent; typedef XFocusChangeEvent XFocusInEvent; typedef ...Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access