Re: Using XTestFakeDeviceMotionEvent().

2008-12-01 Thread James Cloos
 Chris == Chris Ball [EMAIL PROTECTED] writes:

Chris The following program (requires XInput2) warps my pointer to (0,0)
Chris instead of the requested (600,400).  I'd be interested to know whether
Chris this happens for other people,

It warped my pointer to 600,400.

My server and client libs are all from git (master branches), x86 (32bit).

-JimC
-- 
James Cloos [EMAIL PROTECTED] OpenPGP: 1024D/ED7DAEA6
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: Using XTestFakeDeviceMotionEvent().

2008-12-01 Thread Chris Ball
Hi James,

It warped my pointer to 600,400.

My server and client libs are all from git (master branches), x86
(32bit).

Thanks, that's very helpful to hear.  I'm also running from GIT master
(via jhbuild), but on 64-bit x86 and Fedora 10.

Cheers,

- Chris.
-- 
Chris Ball   [EMAIL PROTECTED]
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Using XTestFakeDeviceMotionEvent().

2008-11-30 Thread Chris Ball
Hi,

The following program (requires XInput2) warps my pointer to (0,0)
instead of the requested (600,400).  I'd be interested to know whether
this happens for other people, and if there's something obviously wong
with my code.  Thanks!


// gcc -o xtest xtest.c -Wall -I/usr/include/X11 -lX11 -lXtst -lXext -lXi 
#include stdio.h
#include X11/Xlib.h
#include X11/extensions/XTest.h
#include X11/extensions/XInput.h
#define FALSE 0

int main() {
  Display *xdisplay;
  XExtensionVersion *version;
  XDeviceInfo *devInfo;
  XDevice *xdevice;
  int count, i, devPointer;
  int axes[] = {600,400};

  xdisplay = XOpenDisplay(0); 
  version = XQueryInputVersion(xdisplay, 2, 0);

  if (!(devInfo = XListInputDevices(xdisplay, count)) || !count)
printf(Cannot list devices\n);

  for (i = 0; i  count; i++) {
if (devInfo[i].use == IsXPointer)
  devPointer = i; 
  }

  xdevice = XOpenDevice(xdisplay, devInfo[devPointer].id);
  XTestFakeDeviceMotionEvent(xdisplay, xdevice, FALSE, 0, axes, 2, 0);
  XFlush(xdisplay);
  return 0;
}

-- 
Chris Ball   [EMAIL PROTECTED]
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg