1 XISETFOCUS(libmansuffix)
2 ========================
7 XISetFocus, XIGetFocus - set or get the device's focus.
12 #include <X11/extensions/XInput2.h>
14 Status XISetFocus( Display *display,
19 Status XIGetFocus( Display *display,
20 Window *focus_return);
23 Specifies the connection to the X server.
26 Specifies the device whose focus is to be queried or
33 Returns the current focus window.
36 A valid timestamp or CurrentTime.
41 XISetFocus changes the focus of the specified device ans its
42 last-focus-change time. It has no effect if the specified time
43 is earlier than the current last-focus-change time or is later
44 than the current X server time. Otherwise, the
45 last-focus-change time is set to the specified time.
46 CurrentTime is replaced by the current X server time).
47 XISetFocus causes the X server to generate core, XI and XI2
50 If the focus window is None all keyboard events by this device
51 are discarded until a new focus window is set. Otherwise, if
52 focus is a window, it becomes the device's focus window. If a
53 generated device event would normally be reported to this
54 window or one of its inferiors, the event is reported as usual.
55 Otherwise, the event is reported relative to the focus window.
57 The specified focus window must be viewable at the time
58 XISetFocus is called, or a BadMatch error results. If the focus
59 window later becomes not viewable, the focus reverts to the
60 parent (or the closest viewable ancestor. When the focus
61 reverts, the X server generates core, XI and XI2 focus events
62 but the last-focus-change time is not affected.
64 Attempting to set the focus on a master pointer device or an
65 attached slave device will result in a BadDevice error.
67 XISetFocus can generate BadDevice, BadMatch, BadValue, and
74 A value is outside of the permitted range.
77 An invalid device was specified. The device does not
78 exist or is not a appropriate for the type of change.
81 The window is not viewable.
84 A value for a Window argument does not name a defined