Search code examples
c++qtubuntuvmwarexlib

XWarpPointer does not work on ubuntu 12.04 in wmware player


Hello i'm trying to move the mouse pointer by using Xlib in my Qt application:

cout <<"move mouse to "<<x<<","<<y<<endl;
XWarpPointer(defaultdisplay, None, desktoproot, 0, 0, 0, 0, x, y);
XFlush(defaultdisplay);
//QCursor::setPos(x,y);

but this not work in an ubuntu that is inside a wmware player (maybe vmware tools uses X11), any idea for disabling the vmware mouse integration or using any other code? thanks.


Solution

  • i finally found the solucion, all i needed to do is edit the .vmx file in my Ubuntu virtual machine directory and add the line:

    vmmouse.present = "FALSE"
    

    thats disables the mouse integration.