Mouse issue on Quitting GZDoom

Need help running G/Q/ZDoom/ECWolf/Zandronum/3DGE? Did your computer break? Ask here.

Moderator: GZDoom Developers

Mouse issue on Quitting GZDoom

Postby Enjay » Tue May 26, 2020 12:06 pm

This was discovered when using Nash's PDA starter kit ( viewtopic.php?f=105&t=65849&p=1152977 ), but I *think* it happens with nothing particular loaded in GZDoom.

My mouse (Logitech G300, drivers are up to date) has extra buttons. mouse4 and mouse5 are default-bound to back/forward in Windows. i.e. pressing them goes backwards and forwards in web browsers, file explorer windows etc. A common enough setup for mice with >3 buttons.

If I press mouse4 while in a GZDoom menu, it seems to behave much like pressing the Esc key - i.e. I go back up one menu level. This happens whether the button is bound to something in GZDoom or not (I normally have it bound to alt-fire where it works just fine). Mouse5 doesn't seem to do anything in the menus.

Here is the issue, if I do the following, I have a problem with my mouse when GZDoom quits and I am returned to Windows:

In a GZDoom game, press Esc to bring up the menu
Pick "New Game"
Press mouse4 to go back up 1 level
Press mouse4 again to return to the game world
Press Esc to call up the menu again
Use the arrows to pick Quit Game
Hit Enter for Y to quit

What happens next seems to be that whichever program comes into focus next in Windows (by me clicking on its window) responds to my mouse, but nothing else will. e.g. if I click on Firefox it comes into focus and I can click on it, press links etc. However, if I move my mouse pointer off Firefox onto a file on my desktop and click or right click it, the clicks are ignored. Nothing responds, only Firefox. However, if I then press (I think) mouse5* the situation seems to rectify itself and the mouse works as expected.

*I usually seem to have to mash mouse4 and mouse5 to get control back, so it may not just be mouse5 that's important here.

Short version: pressing mouse4 in a GZDoom menu and quitting somehow seems to "trap" my mouse (heh, mousetrap) into some strange mode where only one program can be in focus and respond to mouse clicks and everything else ignores the mouse until mouse5(?) is pressed.


I suspect that this might be hardware or setup specific, hence this being in technical issues but I suppose it could possibly be a GZDoom bug?
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Mouse issue on Quitting GZDoom

Postby dpJudas » Tue May 26, 2020 1:32 pm

This is most likely a Windows bug. I see similar things when I alt-tab away from exclusive full screen applications where the window now having focus does not get the keyboard input. And alt-tabbing again also rotates it to the wrong window. When I toyed with the rawinput stuff last time it only worked when I was doing exactly 1:1 what DirectInput was doing. Any issue with rawinput and dinput is there to stay.

In general, you can safely file these kind of issues with a [Won't fix]. They've been there since Windows XP and I have a feeling nobody at Microsoft wants to even touch it. The entire input and window border handling in Windows is so buggy and filled with backwards compatibility issues it can't really be changed anymore. Even if GZDoom is causing it there's no way to figure out why.
dpJudas
 
 
 
Joined: 28 May 2016

Re: Mouse issue on Quitting GZDoom

Postby Graf Zahl » Tue May 26, 2020 1:51 pm

The saddest thing here is that the supposedly deprecated method of mouse input (dinput) works better than the officially recommended one (rawinput). I think that tells us all.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Mouse issue on Quitting GZDoom

Postby Enjay » Tue May 26, 2020 2:28 pm

Ah well, so be it then. Not much I can do about it I guess.

As a matter of interest, with dpjudas mentioning how long it's been around on the Windows side of things, I just fired up the last version of ZDoom and it shows exactly the same behaviour. I know that doesn't really mean much, especially if the problem is with Windows, but I thought that it was mildly interesting anyway.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland


Return to Technical Issues

Who is online

Users browsing this forum: No registered users and 1 guest