I&#39;m writing a game, and I want raw mouse input to control camera (so no additional acceleration by X server) and don&#39;t want mouse to escape the window (for obvious reasons).<br>I&#39;m using XI_RawMotion events for raw mouse input, and XWarpPointer to not allow mouse escape the window.<br>
Well, the problem is, when XWarpPointer is called, XI_RawMotion is posted with coordinates of XWarpPointer&#39;s target point in screen coordinates. But it shouldn&#39;t - isn&#39;t it RAW input?<br>How to do it right?<br>
<br>Minimal test case: <a href="http://pastebin.com/WFJULnYk">http://pastebin.com/WFJULnYk</a><br>(captures RawMotion events, and sends XWarpPointer sometimes).<br>Compile as: &quot;gcc warptest.c -o warptest -lX11 -lXi&quot;<br>
You will see a series of normal events, and then a strange event generated by XWarpPointer.<br><br>Anyway, is there a better method of containing pointer in a window without breaking Alt+Tab (that&#39;s what XGrabPointer does)?<br>
Can you also recommend some general best practices with X input for games?<br><br>P.S. Currently using X server 1.8.2 on Arch Linux.<br>