1XQueryPointer(3) XLIB FUNCTIONS XQueryPointer(3)
2
3
4
6 XQueryPointer - get pointer coordinates
7
9 Bool XQueryPointer(Display *display, Window w, Window *root_return,
10 Window *child_return, int *root_x_return, int *root_y_return,
11 int *win_x_return, int *win_y_return, unsigned int
12 *mask_return);
13
15 child_return
16 Returns the child window that the pointer is located in, if
17 any.
18
19 display Specifies the connection to the X server.
20
21 mask_return
22 Returns the current state of the modifier keys and pointer
23 buttons.
24
25 root_return
26 Returns the root window that the pointer is in.
27
28 root_x_return
29 root_y_return
30 Return the pointer coordinates relative to the root window's
31 origin.
32
33 w Specifies the window.
34
35 win_x_return
36 win_y_return
37 Return the pointer coordinates relative to the specified win‐
38 dow.
39
41 The XQueryPointer function returns the root window the pointer is logi‐
42 cally on and the pointer coordinates relative to the root window's ori‐
43 gin. If XQueryPointer returns False, the pointer is not on the same
44 screen as the specified window, and XQueryPointer returns None to
45 child_return and zero to win_x_return and win_y_return. If XQuery‐
46 Pointer returns True, the pointer coordinates returned to win_x_return
47 and win_y_return are relative to the origin of the specified window.
48 In this case, XQueryPointer returns the child that contains the
49 pointer, if any, or else None to child_return.
50
51 XQueryPointer returns the current logical state of the keyboard buttons
52 and the modifier keys in mask_return. It sets mask_return to the bit‐
53 wise inclusive OR of one or more of the button or modifier key bitmasks
54 to match the current state of the mouse buttons and the modifier keys.
55
56 XQueryPointer can generate a BadWindow error.
57
59 BadWindow A value for a Window argument does not name a defined Window.
60
62 XGetWindowAttributes(3), XQueryTree(3)
63 Xlib - C Language X Interface
64
65
66
67X Version 11 libX11 1.6.9 XQueryPointer(3)