I have an application which uses Xlib library for simulate a mouse on the screen.
I used XQueryPointer and XWarpPointer functions with which I can simulate a mouse movement and also a click. My problem is that I can't "drag" an element (it's an interface with some blocks which you can move within a Qt application written in C++ and launched on Ubuntu).
I use many parts of this extract:
Sending X11 click event doesn't work with some windows
Can this function help me?
::XGrabPointer(mDisplay, window, True,
           ButtonPressMask |
             ButtonReleaseMask |
             PointerMotionMask |
             FocusChangeMask |
             EnterWindowMask |
              LeaveWindowMask,
           GrabModeAsync,
           GrabModeAsync,
           RootWindow(mDisplay, DefaultScreen(mDisplay)),
           None,
           CurrentTime);
Do you have any idea?
Thank you in advance.