XWarpPointer breaks raw mouse input.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I'm writing a game, and I want raw mouse input to control camera (so no additional acceleration by X server) and don't want mouse to escape the window (for obvious reasons).
I'm using XI_RawMotion events for raw mouse input, and XWarpPointer to not allow mouse escape the window.
Well, the problem is, when XWarpPointer is called, XI_RawMotion is posted with coordinates of XWarpPointer's target point in screen coordinates. But it shouldn't - isn't it RAW input?
How to do it right?

Minimal test case:
(captures RawMotion events, and sends XWarpPointer sometimes).
Compile as: "gcc warptest.c -o warptest -lX11 -lXi"
You will see a series of normal events, and then a strange event generated by XWarpPointer.

Anyway, is there a better method of containing pointer in a window without breaking Alt+Tab (that's what XGrabPointer does)?
Can you also recommend some general best practices with X input for games?

P.S. Currently using X server 1.8.2 on Arch Linux. (reported to happen on 1.9 as well)
xorg@xxxxxxxxxxxxxxxxxxxxx: X.Org support
Your subscription address: list-xorg@xxxxxxxxxxx

[X Forum]     [Devices]     [XFree86]     [XFree86 Newbie]     [Site Home]     [IETF Annouce]     [Security]     [Fontconfig]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Video for Linux]     [Linux RAID]     [Linux Resources]

Powered by Linux