1XISETFOCUS(3)                                                    XISETFOCUS(3)
2
3
4

NAME

6       XISetFocus, XIGetFocus - set or get the device's focus.
7

SYNOPSIS

9       #include <X11/extensions/XInput2.h>
10
11       Status XISetFocus( Display *display,
12                          int deviceid,
13                          Window focus,
14                          Time time);
15
16       Status XIGetFocus( Display *display,
17                          Window *focus_return);
18
19       display
20              Specifies the connection to the X server.
21
22       deviceid
23              Specifies the device whose focus is to be queried or
24              changed.
25
26       focus
27              The new focus window.
28
29       focus_return
30              Returns the current focus window.
31
32       time
33              A valid timestamp or CurrentTime.
34

DESCRIPTION

36           XISetFocus changes the focus of the specified device ans its
37           last-focus-change time. It has no effect if the specified time
38           is earlier than the current last-focus-change time or is later
39           than the current X server time. Otherwise, the
40           last-focus-change time is set to the specified time.
41           CurrentTime is replaced by the current X server time).
42           XISetFocus causes the X server to generate core, XI and XI2
43           focus events.
44
45           If the focus window is None all keyboard events by this device
46           are discarded until a new focus window is set. Otherwise, if
47           focus is a window, it becomes the device's focus window. If a
48           generated device event would normally be reported to this
49           window or one of its inferiors, the event is reported as usual.
50           Otherwise, the event is reported relative to the focus window.
51
52           The specified focus window must be viewable at the time
53           XISetFocus is called, or a BadMatch error results. If the focus
54           window later becomes not viewable, the focus reverts to the
55           parent (or the closest viewable ancestor. When the focus
56           reverts, the X server generates core, XI and XI2 focus events
57           but the last-focus-change time is not affected.
58
59           Attempting to set the focus on a master pointer device or an
60           attached slave device will result in a BadDevice error.
61
62           XISetFocus can generate BadDevice, BadMatch, BadValue, and
63           BadWindow errors.
64

DIAGNOSTICS

66           BadValue
67                  A value is outside of the permitted range.
68
69           BadDevice
70                  An invalid device was specified. The device does not
71                  exist or is not a appropriate for the type of change.
72
73           BadMatch
74                  The window is not viewable.
75
76           BadWindow
77                  A value for a Window argument does not name a defined
78                  Window.
79
80
81
82                                  03/09/2013                     XISETFOCUS(3)
Impressum