Logo Search packages:      
Sourcecode: xdotool version File versions  Download package

int xdo_mousemove ( const xdo_t xdo,
int  x,
int  y,
int  screen 
)

Move the mouse to a specific location.

Parameters:
x the target X coordinate on the screen in pixels.
y the target Y coordinate on the screen in pixels.
screen the screen (number) you want to move on.

Definition at line 613 of file xdo.c.

References xdo::xdpy.

                                                               {
  int ret = 0;

  /* There is a bug (feature?) in XTestFakeMotionEvent that causes
   * the screen number in the request to be ignored. The internets
   * seem to recommend XWarpPointer instead, ie;
   * https://bugzilla.redhat.com/show_bug.cgi?id=518803
   */
  Window screen_root = RootWindow(xdo->xdpy, screen);
  ret = XWarpPointer(xdo->xdpy, None, screen_root, 0, 0, 0, 0, x, y);
  XFlush(xdo->xdpy);
  return _is_success("XWarpPointer", ret == 0);
}


Generated by  Doxygen 1.6.0   Back to index