summaryrefslogtreecommitdiffstats
path: root/x11vnc/win_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'x11vnc/win_utils.c')
-rw-r--r--x11vnc/win_utils.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/x11vnc/win_utils.c b/x11vnc/win_utils.c
index a7ebe06..4ff3107 100644
--- a/x11vnc/win_utils.c
+++ b/x11vnc/win_utils.c
@@ -19,6 +19,7 @@ int get_window_size(Window win, int *x, int *y);
void snapshot_stack_list(int free_only, double allowed_age);
void update_stack_list(void);
Window query_pointer(Window start);
+unsigned int mask_state(void);
int pick_windowid(unsigned long *num);
Window descend_pointer(int depth, Window start, char *name_info, int len);
@@ -279,6 +280,20 @@ Window query_pointer(Window start) {
}
}
+unsigned int mask_state(void) {
+ Window r, c;
+ int rx, ry, wx, wy;
+ unsigned int mask;
+
+ RAWFB_RET(0)
+
+ if (XQueryPointer(dpy, rootwin, &r, &c, &rx, &ry, &wx, &wy, &mask)) {
+ return mask;
+ } else {
+ return 0;
+ }
+}
+
int pick_windowid(unsigned long *num) {
char line[512];
int ok = 0, n = 0, msec = 10, secmax = 15;