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

mouse is warped when it is initialized

ghorn opened this issue · comments

When I start my OGRE/OIS application and call
InputManager::createInputObject(OIS::OISMouse, true),
the mouse jumps to the upper left corner of the display. This behavior is undesired, and I haven't been able to disable it.

I suspect it's this line of code:
https://github.com/wgois/OIS/blob/master/src/linux/LinuxMouse.cpp#L68-L69

    //Warp mouse inside window
    XWarpPointer(display,None,window,0,0,0,0, 6,6);

Is it possible to disable this? Maybe conditionally disable it if x11_mouse_hide == false?

This function call does indeed move the cursor to the top left corner of the window. I need to go through the code to look at what's going on exactly. It even target the coordinates [6,6]. This is a bit strange.