wgois / OIS

Official OIS repository. Object oriented Input System

Home Page:https://wgois.github.io/OIS/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Non-Exclusive X11 Linux Mouse Is Offset

VENTDEV opened this issue · comments

Describe the bug
This is a bug that I fixed in my own custom implementation of OIS back in 2013 or so. Giving the latest master a try, it remains.

On X11 Linux non-exclusive mouse (native/hardware mouse), the OS and ingame mouse positions are offset.

Software Mouse works perfectly fine.

Incorrect
The tip of the yellow arrow is where the game thinks the mouse is. The mouse cursor is the location of the hardware mouse.

To Reproduce
Compile the latest master for Linux. Create an Ogre3d SDL window. Use OIS in non-exclusive/hidden mouse mode. You'll find that the mouse positions don't match.

Expected behavior
The tip of the hardware mouse and the mouse position in the renderer window should match.

Correct
After my code fix, the two are aligned properly.

Platform (please complete the following information):

  • OS: Linux
  • Backend: X11
  • Version: 1.3 to Master.

Additional context
I already implemented a fix for this. I am not sure if the code quality is up to standard. It probably can be handled better/prettier. But I will put what I am using in a pull request anyway.