We only change the mouse positions if the mouse is grabbed and we have focus. Otherwise, we get an offset. If we don't have the mouse grabbed, or mouse focus is lost, just pipe in the Xmotion values directly.
The code could probably be merged into the clipping/warping if(grabMouse) conditional below. But I believe this is cleaner with less nesting.
Fixes https://github.com/wgois/OIS/issues/93
We only change the mouse positions if the mouse is grabbed and we have focus. Otherwise, we get an offset. If we don't have the mouse grabbed, or mouse focus is lost, just pipe in the Xmotion values directly.
The code could probably be merged into the clipping/warping if(grabMouse) conditional below. But I believe this is cleaner with less nesting.
Affected backends Linux X11 Mouse.