puklaus's picture

Hided mouse cursor problem

Project:The Open Toolkit library
Category:bug report

When I use CursorVisible = false; to hide mouse cursor, and press alt+tab to change window and then
back to my program, I cant move my own mouse cursor (drawed to Mouse.X, Mouse.Y position) to the
bottom and rightside of the window. And moving window does not work correctly (it falls bottom of the screen).

To test this, add CursorVisible = false; to Picking.cs OnLoad() method, one cant pick triangles rightside and bottom.

(win7 x32, latest otk from svn).


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture


Status:open» confirmed

I can reproduce this, investigating.

madrang's picture


Same problem here, In Linux (Ubuntu 10.10) all is working fine. But in windows when CursorVisible is set to false the Mouse.Move event values are wrong. If the window is maximized or is position on the desktop is [0,0] then it works if not then it seams to me (from lots of testing) that the resulting value returned correspond to
Mouse.X = (Mouse.X < Window.Width - Window.X) ? Mouse.X : Window.Width - Window.X;
Mouse.Y = (Mouse.Y < Window. Height - Window.Y) ? Mouse.Y : Window.Height - Window.Y;
So it would explain why when the window is maximized or at Position 0 it works but i can't find where is the bug in OpenTK that cause this to happen. Also, on widows the cursor is still visible and not locked in the window.

Hoping this problem will be resolved soon. Madrang

the Fiddler's picture


Status:confirmed» fixed

Thanks, this pointed me to the right direction. Fixed in r3079.

the Fiddler's picture


Version:1.x-dev» 1.1-2014-01-02
Status:fixed» closed

Closing bugs fixed in OpenTK 1.1.

If this is still an issue please file a new bug report at https://github.com/opentk/opentk/issues