1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
'\" t
.\" Title: xisetfocus
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 09/07/2010
.\" Manual: [FIXME: manual]
.\" Source: [FIXME: source]
.\" Language: English
.\"
.TH "XISETFOCUS" "libmansuffix" "09/07/2010" "[FIXME: source]" "[FIXME: manual]"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
XISetFocus, XIGetFocus \- set or get the device\'s focus\&.
.SH "SYNOPSIS"
.sp
.nf
#include <X11/extensions/XInput2\&.h>
.fi
.sp
.nf
Status XISetFocus( Display *display,
int deviceid,
Window focus,
Time time);
.fi
.sp
.nf
Status XIGetFocus( Display *display,
Window *focus_return);
.fi
.sp
.nf
display
Specifies the connection to the X server\&.
.fi
.sp
.nf
deviceid
Specifies the device whose focus is to be queried or
changed\&.
.fi
.sp
.nf
focus
The new focus window\&.
.fi
.sp
.nf
focus_return
Returns the current focus window\&.
.fi
.sp
.nf
time
A valid timestamp or CurrentTime\&.
.fi
.SH "DESCRIPTION"
.sp
.if n \{\
.RS 4
.\}
.nf
XISetFocus changes the focus of the specified device ans its
last\-focus\-change time\&. It has no effect if the specified time
is earlier than the current last\-focus\-change time or is later
than the current X server time\&. Otherwise, the
last\-focus\-change time is set to the specified time\&.
CurrentTime is replaced by the current X server time)\&.
XISetFocus causes the X server to generate core, XI and XI2
focus events\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
If the focus window is None all keyboard events by this device
are discarded until a new focus window is set\&. Otherwise, if
focus is a window, it becomes the device\'s focus window\&. If a
generated device event would normally be reported to this
window or one of its inferiors, the event is reported as usual\&.
Otherwise, the event is reported relative to the focus window\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
The specified focus window must be viewable at the time
XISetFocus is called, or a BadMatch error results\&. If the focus
window later becomes not viewable, the focus reverts to the
parent (or the closest viewable ancestor\&. When the focus
reverts, the X server generates core, XI and XI2 focus events
but the last\-focus\-change time is not affected\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
Attempting to set the focus on a master pointer device or an
attached slave device will result in a BadDevice error\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
XISetFocus can generate BadDevice, BadMatch, BadValue, and
BadWindow errors\&.
.fi
.if n \{\
.RE
.\}
.SH "DIAGNOSTICS"
.sp
.if n \{\
.RS 4
.\}
.nf
BadValue
A value is outside of the permitted range\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
BadDevice
An invalid device was specified\&. The device does not
exist or is not a appropriate for the type of change\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
BadMatch
The window is not viewable\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
BadWindow
A value for a Window argument does not name a defined
Window\&.
.fi
.if n \{\
.RE
.\}
|