8 void move_pointer(gint dest_x
, gint dest_y
, gboolean discard_previous
);
11 * Move the pointer to the (x, y) coordinates of the root window
12 * irrespective to the current pointer position.
14 void move_pointer(gint dest_x
, gint dest_y
, gboolean discard_previous
)
22 if (discard_previous
== TRUE
) {
23 event_mask
= PointerMotionMask
| PointerMotionHintMask
|
24 Button1MotionMask
| Button2MotionMask
| Button3MotionMask
|
25 Button4MotionMask
| Button5MotionMask
| ButtonMotionMask
;
27 while (XCheckMaskEvent(dpy
, event_mask
, &xev
) == True
);
30 XWarpPointer(dpy
, None
, GDK_ROOT_WINDOW(), 0, 0, 0, 0, dest_x
, dest_y
);