1XISETFOCUS(libmansuffix) 2======================== 3 4NAME 5---- 6 7 XISetFocus, XIGetFocus - set or get the device's focus. 8 9SYNOPSIS 10-------- 11 12 #include <X11/extensions/XInput2.h> 13 14 Status XISetFocus( Display *display, 15 int deviceid, 16 Window focus, 17 Time time); 18 19 Status XIGetFocus( Display *display, 20 Window *focus_return); 21 22 display 23 Specifies the connection to the X server. 24 25 deviceid 26 Specifies the device whose focus is to be queried or 27 changed. 28 29 focus 30 The new focus window. 31 32 focus_return 33 Returns the current focus window. 34 35 time 36 A valid timestamp or CurrentTime. 37 38DESCRIPTION 39----------- 40 41 XISetFocus changes the focus of the specified device and 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 48 focus events. 49 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. 56 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. 63 64 Attempting to set the focus on a master pointer device or an 65 attached slave device will result in a BadDevice error. 66 67 XISetFocus can generate BadDevice, BadMatch, BadValue, and 68 BadWindow errors. 69 70DIAGNOSTICS 71----------- 72 73 BadValue 74 A value is outside of the permitted range. 75 76 BadDevice 77 An invalid device was specified. The device does not 78 exist or is not a appropriate for the type of change. 79 80 BadMatch 81 The window is not viewable. 82 83 BadWindow 84 A value for a Window argument does not name a defined 85 Window. 86 87