wgois / OIS

Official OIS repository. Object oriented Input System
https://wgois.github.io/OIS/
zlib License
254 stars 87 forks source link

mouse is warped when it is initialized #19

Closed ghorn closed 1 year ago

ghorn commented 8 years ago

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?

Ybalrid commented 6 years ago

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.