tommed
April 13th, 2009, 08:41 PM
Hi Guys,
Apologies if this isn't the best place for this post, but it seemed the closest match..?
I am working on C program to control the mouse using hand gestures (and my webcam).. I have everything working, however when I call XWarpPointer nothing happens (no errors either!)
I thought it might be my code (available at http://is.gd/rVpk), so I installed xdotools and called:
xdotools movemouse 10 10
..but nothing happened?! I believe that OpenBox (my window manager) is running on top of X11, so why wouldn't this work? I even tried running it as root (to see if it was a permissions problem) but that didn't work either.
I may also be worth noting that I am running the OS in a VirtualBox, hosted on a mac (sorry my setup isn't very simple?!!)
Could anyone suggest why I am unable to control the position of my mouse using X11 commands (either from my program or from xdotools)?
The code snippet I am using is basically:
//...
Display *xdisplay1 = XOpenDisplay(NULL);
if (!xdisplay1) exit(1);
XWarpPointer(xdisplay1, None, None, 0, 0, 0, 0, 10, 10);
XCloseDisplay(xdisplay1);
//...
It compiles fine, and xdisplay1 is definitely populated?!! HELP!
Many Thanks,
Tom
Apologies if this isn't the best place for this post, but it seemed the closest match..?
I am working on C program to control the mouse using hand gestures (and my webcam).. I have everything working, however when I call XWarpPointer nothing happens (no errors either!)
I thought it might be my code (available at http://is.gd/rVpk), so I installed xdotools and called:
xdotools movemouse 10 10
..but nothing happened?! I believe that OpenBox (my window manager) is running on top of X11, so why wouldn't this work? I even tried running it as root (to see if it was a permissions problem) but that didn't work either.
I may also be worth noting that I am running the OS in a VirtualBox, hosted on a mac (sorry my setup isn't very simple?!!)
Could anyone suggest why I am unable to control the position of my mouse using X11 commands (either from my program or from xdotools)?
The code snippet I am using is basically:
//...
Display *xdisplay1 = XOpenDisplay(NULL);
if (!xdisplay1) exit(1);
XWarpPointer(xdisplay1, None, None, 0, 0, 0, 0, 10, 10);
XCloseDisplay(xdisplay1);
//...
It compiles fine, and xdisplay1 is definitely populated?!! HELP!
Many Thanks,
Tom