1xcb_set_input_focus(3)           XCB Requests           xcb_set_input_focus(3)
2
3
4

NAME

6       xcb_set_input_focus - Sets input focus
7

SYNOPSIS

9       #include <xcb/xproto.h>
10
11   Request function
12       xcb_void_cookie_t xcb_set_input_focus(xcb_connection_t *conn,
13              uint8_t revert_to, xcb_window_t focus, xcb_timestamp_t time);
14

REQUEST ARGUMENTS

16       conn      The XCB connection to X11.
17
18       revert_to One of the following values:
19
20                 XCB_INPUT_FOCUS_NONE
21                           The focus reverts to XCB_NONE, so no window will
22                           have the input focus.
23
24                 XCB_INPUT_FOCUS_POINTER_ROOT
25                           The focus reverts to XCB_POINTER_ROOT respectively.
26                           When the focus reverts, FocusIn and FocusOut events
27                           are generated, but the last-focus-change time is
28                           not changed.
29
30                 XCB_INPUT_FOCUS_PARENT
31                           The focus reverts to the parent (or closest view‐
32                           able ancestor) and the new revert_to value is
33                           XCB_INPUT_FOCUS_NONE.
34
35                 XCB_INPUT_FOCUS_FOLLOW_KEYBOARD
36                           NOT YET DOCUMENTED. Only relevant for the xinput
37                           extension.
38
39                 Specifies what happens when the focus window becomes unview‐
40                 able (if focus is neither XCB_NONE nor XCB_POINTER_ROOT).
41
42       focus     The window to focus. All keyboard events will be reported to
43                 this window. The window must be viewable (TODO), or a
44                 xcb_match_error_t occurs (TODO).
45
46                 If focus is XCB_NONE (TODO), all keyboard events are discard‐
47                 ed until a new focus window is set.
48
49                 If focus is XCB_POINTER_ROOT (TODO), focus is on the root
50                 window of the screen on which the pointer is on currently.
51
52       time      Timestamp to avoid race conditions when running X over the
53                 network.
54
55                 The special value XCB_CURRENT_TIME will be replaced with the
56                 current server time.
57

DESCRIPTION

59       Changes the input focus and the last-focus-change time. If the speci‐
60       fied time is earlier than the current last-focus-change time, the re‐
61       quest is ignored (to avoid race conditions when running X over the net‐
62       work).
63
64       A FocusIn and FocusOut event is generated when focus is changed.
65

RETURN VALUE

67       Returns an xcb_void_cookie_t. Errors (if any) have to be handled in the
68       event loop.
69
70       If you want to handle errors directly with xcb_request_check instead,
71       use xcb_set_input_focus_checked. See xcb-requests(3) for details.
72

ERRORS

74       xcb_match_error_t
75                 The specified focus window is not viewable.
76
77       xcb_value_error_t
78                 TODO: Reasons?
79
80       xcb_window_error_t
81                 The specified focus window does not exist.
82

SEE ALSO

84       xcb-requests(3), xcb_focus_in_event_t(3), xcb_focus_out_event_t(3)
85

AUTHOR

87       Generated from xproto.xml. Contact xcb@lists.freedesktop.org for cor‐
88       rections and improvements.
89
90
91
92X Version 11                     libxcb 1.13.1          xcb_set_input_focus(3)
Impressum