Mouse cursor stuck in middle of screen, old bug

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Mouse cursor stuck in middle of screen, old bug

Re: Mouse cursor stuck in middle of screen, old bug

by Graf Zahl » Fri Jun 09, 2017 7:11 am

It is put on hold because nobody here understands the motivation behind this code.

Re: Mouse cursor stuck in middle of screen, old bug

by ZZYZX » Fri Jun 09, 2017 6:23 am

Unfixable? Capturing mouse/hiding cursor when the window gains focus (or every second/frame) is impossible?

Re: Mouse cursor stuck in middle of screen, old bug

by drfrag » Fri Jun 09, 2017 5:13 am

I think for me this happens only then GZDoom doesn't get the focus on startup.

Re: Mouse cursor stuck in middle of screen, old bug

by Graf Zahl » Fri Jun 09, 2017 4:53 am

This is a perfect case where some feedback from Randi would be appreciated. I'm simply not sure what the initial motivation for the cursor locking was.

Re: Mouse cursor stuck in middle of screen, old bug

by Rachael » Fri Jun 09, 2017 4:26 am

I'm moving this to on hold because this was reported at DRD Team years ago and it was pretty much stated there that this may be unfixable - but nevertheless this wasn't closed there nor here but it shouldn't help clutter up the newer reports.

Nevertheless, the issue is acknowledged, and I am sure there is every intention to fix it - it's just a question of finding the best fix.

Re: Mouse cursor stuck in middle of screen, old bug

by ZZYZX » Thu Jun 08, 2017 3:34 am

Graf Zahl wrote:What I cannot say is if RawInput provides any advantage for mouse handling.
IIRC it works a lot better with high polling rate mice (DInput would skip mouse clicks, delay them, etc), as well as providing a bit more accurate acceleration.

Re: Mouse cursor stuck in middle of screen, old bug

by XxMiltenXx » Wed Jun 07, 2017 9:31 pm

Hellser wrote:P.S. I can force this glitch (mouse cursor shown on screen) to happen by alt-tabbing like crazy when GZDoom is loading.
I can confirm that this bug happens a lot, when the game is somehow minimized during startup (e.g. firewall request etc.). Then you'll have the mouse cursor in the center if the screen.

Re: Mouse cursor stuck in middle of screen, old bug

by Hellser » Wed Jun 07, 2017 9:22 am

Graf Zahl wrote:With GUI mouse I meant how the engine interfaces with the system to get the mouse coordinates. in_mouse == 1 contains code to reset the mouse position to the center and that seems to trigger here somehow.

There's also a second CVAR at play here. What value does 'mouse_capturemode' have when this happens?
mouse_capturemode is set to 0 when this happens. According to the wiki, this only effects Windowed Mode. I'm playing GZDoom in Fullscreen.
in_mouse is set to 0, setting it to 1 then back to 0 fixes the mouse in the center glitch.

P.S. I can force this glitch (mouse cursor shown on screen) to happen by alt-tabbing like crazy when GZDoom is loading.

Re: Mouse cursor stuck in middle of screen, old bug

by Wuerfel_21 » Wed Jun 07, 2017 7:08 am

This sometimes happens to me. It can be fixed by opening the menu, but only when the mouse is enabled in the menu (including touchscreen mode)

Re: Mouse cursor stuck in middle of screen, old bug

by Graf Zahl » Wed Jun 07, 2017 1:25 am

ZZYZX wrote:There are multiple mouse-related bugs — mouse not registering at all, Windows cursor in the middle of the screen, mouse reacting with few second delay... Generally fixes itself by switching in_mouse to 1 and then back to the preferred value (bind something "in_mouse 1; in_mouse 3").
Actually, after having a closer look, it seems like in_mouse == 3 may be the problem. The RawInput handler also messes around with the mouse position, like the GUI mouse handler.
Unfortunately I have no idea why this is necessary but if you run into this problem, set in_mouse to 2, i.e. DirectInput. That handler does not center the mouse by force. What I cannot say is if RawInput provides any advantage for mouse handling.

Or if you feel no need to use RawInput at all, set 'norawinput' to true which uses DirectInput for everything.

Re: Mouse cursor stuck in middle of screen, old bug

by Graf Zahl » Wed Jun 07, 2017 1:07 am

With GUI mouse I meant how the engine interfaces with the system to get the mouse coordinates. in_mouse == 1 contains code to reset the mouse position to the center and that seems to trigger here somehow.

There's also a second CVAR at play here. What value does 'mouse_capturemode' have when this happens?

Re: Mouse cursor stuck in middle of screen, old bug

by ZZYZX » Tue Jun 06, 2017 11:29 pm

btw, mouse in the middle is not caused by the capture anyway. It started happening on Zandronum 2.x when they backported raw input and associated mouse code, but they don't have mouse in menus yet.
There are multiple mouse-related bugs — mouse not registering at all, Windows cursor in the middle of the screen, mouse reacting with few second delay... Generally fixes itself by switching in_mouse to 1 and then back to the preferred value (bind something "in_mouse 1; in_mouse 3").

Re: Mouse cursor stuck in middle of screen, old bug

by Hellser » Tue Jun 06, 2017 11:21 pm

Happens to me too on rare occasion, but I'd rather see this issue handled nicely. Not something that other people use to be removed on the basis that it's problematic on some systems / happens to someone rarely.

Re: Mouse cursor stuck in middle of screen, old bug

by invictius » Tue Jun 06, 2017 7:12 pm

Nash wrote:Whoa whoa whoa whoa that's really backwards progress, Graf. Keep note that OP is known to be a die hard fan of old machines so it could very well be just his computer. Besides, how many reports of mouse-related issues have there been the past years? Like, 3 maybe?

I use mouse in the menus exclusively and cannot imagine going back to keyboard controls.
Actually it happens on my i5 and i7, with versions from 1.9 to 3.x.

Re: Mouse cursor stuck in middle of screen, old bug

by Nash » Tue Jun 06, 2017 6:07 pm

That's still what I use... I need the selector to update in real-time as I move the cursor around, as is typical for any graphical user interface on the computer. The lack of visual feedback on the touchscreen mode drives me nuts.

Again, OP hasn't given much details. What machine he's using. Things like that. You can't possibly ditch a feature (and a basic essential feature too, IMO) just because one person made a vague report.

Top