SDL2 ignore my XWarpPointer calls


I’ve developed a software to move the mouse pointer with the smartphone sensors to control the point of view in games. My software is not using SDL, it calls directly XwarpPointer to move the pointer, but i’ve noticed that some games (e.g. Darkplaces) that worked in the past (when they are linked against SDL 1.2) started to ingore my mouse events and not work anymore after they switched to SDL 2.

This is my code:

Display* display = QX11Info::display();
XWarpPointer( display, None, None, 0, 0, 0, 0, x, y );
XFlush( display );

I’m on Debian Stretch Linux

What could be the problem?

Thanks in advance


Ok, i endend up using XTestFakeMotionEvent from Xtest extension, and now it’s working for both SDL 1.2 and 2.0