Clicking on GZDoom can disable mouse cursor globally

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Guest

Clicking on GZDoom can disable mouse cursor globally

Post by Guest »

Hello, I was asking about this in the ZDoom official discord #help channel and wildweasel told me to post here:

Currently, I am playing GZDoom in borderless window mode most of the time.
This is because I have 5 monitors and it is inconvenient to use exclusive fullscreen mode.

What I have found is that this sequence:

1) launch GZDoom Windows-x64 (tested on 3.3.1 and 3.3.2) in borderless window mode with "enable mouse in menus" disabled
2) alt-tab out of the application
3) click on the application

causes the mouse cursor to disappear permanently. It also does not properly task switch back to GZDoom.

As far as I can tell, there is no way to bring the mouse cursor back without fully closing the application.

Please let me know if you need additional details, or would like me to upload my .ini file.

Since this is a UI bug, I do not have a demo or example to upload.
User avatar
Rachael
Posts: 13531
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Clicking on GZDoom can disable mouse cursor globally

Post by Rachael »

When being borderless windowed, even taking up a full monitor space it should act like a regular window. The fact that it doesn't means that something is fucky on Microsoft's end, and I did not program in every little fucky scenario Microsoft would put into that. In fact, the *only* thing it does is it disables the Window border, then sets the window to the size of the monitor, and then relocates the window to (0,0) on said monitor. It doesn't even disable the taskbar - Microsoft did that for me (thankfully).

Nevertheless, have you tried activating the console or menu before alt-tabbing out? It should release the mouse cursor either way, and that should cause it to show on other desktops.

Does alt-tabbing out while in a regular window (not borderless) release the mouse cursor properly?
Guest

Re: Clicking on GZDoom can disable mouse cursor globally

Post by Guest »

It does happen with the menu open or with the console open. However, I discovered that having borderless window mode on "yes" does not override the "fullscreen" toggle which was also on "yes."

I had presumed that "fullscreen" = yes and "borderless windowed mode" = yes would result in a fullscreen borderless window, however it appears that "fullscreen" always means "exclusive fullscreen" regardless of any other settings. It also seems that the "borderless window" option implies a window the size of the monitor. Changing resolution while in "borderless windowed" mode appears to change only the game's render resolution irrespective of the "resolution scale" slider—the window itself remains the size of the whole display.

Perhaps "borderless windowed mode" should be rolled into the fullscreen mode as a third option there? The way it is listed there currently is a little unintuitive. Changing the options to be "no", "exclusive", and "borderless" might be clearer. Many games have that sort of selection under their "fullscreen" option.
Although, and this is a problem with GZDoom's UI in general, the inability to see other available choices (requiring users to cycle through all of the options for a setting to know them all) is particularly jarring in this case, since switching from fullscreen mode and back can cause a monitor resolution change.

In any case, with the exclusive fullscreen mode disabled the mouse cursor appears in the menu and console and can be moved out of the application onto other monitors. Clicking on GZDoom focuses it properly and the mouse still doesn't work in the menu (which is what I wanted, as I have it disabled.) So, I suppose the problem is solved.

Thanks for your assistance and keep up the good work! :3:
User avatar
Rachael
Posts: 13531
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Clicking on GZDoom can disable mouse cursor globally

Post by Rachael »

You are right that the Borderless option *should* be merged with the fullscreen option into a single CVAR - but that is not going to happen until Borderless becomes available on other platforms besides Windows. Considering it's a Windows-only thing at the moment, it should have its own CVAR in order to allow the actual "fullscreen" CVAR to behave on other platforms similarly to what it does on Windows right now. I don't really know how to do it with SDL2 and Cocoa, sadly.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Clicking on GZDoom can disable mouse cursor globally

Post by _mental_ »

Cocoa backend always uses a borderless window. IIRC the same applies to SDL backend due to SDL_WINDOW_FULLSCREEN_DESKTOP flag.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Clicking on GZDoom can disable mouse cursor globally

Post by Graf Zahl »

Sometimes I wonder if there actually should be a real mode switch option anymore. That's a relic from the past that really doesn't play well with modern display hardware.

Is there even any technical difference between a borderless fullscreen window and 'real' fullscreen mode when using the desktop resolution? Unlike Direct3D, OpenGL never was able to enter an exclusive fullscreen mode that gets handled by the system, it always required changing the global system resolution, resulting in re-layouting all other windows.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Clicking on GZDoom can disable mouse cursor globally

Post by _mental_ »

IMHO there is no point to keep real fullscreen. It may be required for some very specific cases like multi-monitor surround (AMD Eyefinity) or 3D glasses setups (NVIDIA 3D Vision). At the moment I have no ability to verify this though.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Clicking on GZDoom can disable mouse cursor globally

Post by Graf Zahl »

I generally agree. What worries me is the backwards tendencies among retro-gamers (e.g. 'only CRTs are decent monitors.', 'I want real scan lines', etc., that makes them stick to old hardware for which the feature actually does have some value. On the other hand, I guess that most of these stick to those specialty ports that seem to be quite popular at Doomworld (but nowhere else... :mrgreen:)
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Clicking on GZDoom can disable mouse cursor globally

Post by _mental_ »

In 2018 forcing a resolution change is so old school. Setups with more than one monitor suffer from it badly.
I guess for the mentioned target audience Doom loaded in DOSBox is not true vanilla. And so, GZDoom is out of scope for them anyway.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Clicking on GZDoom can disable mouse cursor globally

Post by Graf Zahl »

Agreed. I'd still be careful with making too many potentially breaking changes all at once.
Let's not forget that we still have a significant percentage of users on outdated and slow hardware that cannot use render buffers and then upscale the result. For those setting a lower resolution, even if it provides sub-par visual results may be the only option to play at acceptable frame rates.

On the other hand, if all that crappy video mode code could be removed from the backends, things would become a LOT cleaner.
dpJudas
 
 
Posts: 3037
Joined: Sat May 28, 2016 1:01 pm

Re: Clicking on GZDoom can disable mouse cursor globally

Post by dpJudas »

Graf Zahl wrote:Let's not forget that we still have a significant percentage of users on outdated and slow hardware that cannot use render buffers and then upscale the result. For those setting a lower resolution, even if it provides sub-par visual results may be the only option to play at acceptable frame rates.
This is really the only argument for keeping it.

Maybe a solution would be to create a vid_modeswitch boolean cvar that CRT and legacy users could switch on. When it isn't on the Fullscreen setting means "Windowed Fullscreen" with a render buffer of the chosen resolution (like we already have on macOS). That would make GZDoom never do a mode switch unless an user explicitly asked for it.

Edit: thinking about it, if render buffers are off then it could force this boolean to be on. That would make the legacy users never notice the change. Only CRT users would have to turn it on then.
User avatar
Korell
Posts: 439
Joined: Sun May 28, 2017 1:01 pm

Re: Clicking on GZDoom can disable mouse cursor globally

Post by Korell »

True fullscreen has a performance benefit over a borderless windowed mode as when in fullscreen the Windows desktop doesn't have to be rendered, so it frees up some resources. Borderless windowed mode, however, because it does render the desktop (as it is really just a window) means that Alt-Tabbing is quicker. I've also read that framerate capping doesn't work in borderless windowed modes, but this may be something on a game-by-game basis, I've not tried it myself. Lastly, if you are in a borderless windowed mode then any Windows notifications will pop-up over the display as and when you get them, but this doesn't happen in fullscreen. You can disable the notifications, though.

For me, I only have one monitor, and I'm using true fullscreen for GZDoom.
dpJudas
 
 
Posts: 3037
Joined: Sat May 28, 2016 1:01 pm

Re: Clicking on GZDoom can disable mouse cursor globally

Post by dpJudas »

As Graf already wrote, OpenGL doesn't have an exclusive mode. Fullscreen in GZDoom is a window covering the entire screen with no decorations. Windows has special handling for this situation where it turns off the DWM - that's the primary reason why you can feel any difference: the input latency is lower and the DWM doesn't miss a frame here and there when turned off.
Cacodemon345
Posts: 419
Joined: Fri Dec 22, 2017 1:53 am
Graphics Processor: ATI/AMD (Modern GZDoom)
Contact:

Re: Clicking on GZDoom can disable mouse cursor globally

Post by Cacodemon345 »

_mental_ wrote:I guess for the mentioned target audience Doom loaded in DOSBox is not true vanilla.
This isn't true for real hardware-based DOS running on modern hardware.
(Yes, I am talking about running Vanilla DOS-based Doom on modern, real hardware with FreeDOS, but without sound and music :mrgreen:)
It's probably irrelevant anyway.
Graf Zahl wrote:Only CRT users would have to turn it on then.
There's barely any CRT users in this day and time. Those who use CRT are probably stuck with old hardware, probably running on OpenGL 2.0 or outdated stuff.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Clicking on GZDoom can disable mouse cursor globally

Post by Graf Zahl »

Cacodemon345 wrote:. Those who use CRT are probably stuck with old hardware, probably running on OpenGL 2.0 or outdated stuff.

A gentle reminder: 6% of our users are actually still using OpenGL 2.x, which means that a real mode switch is the only option to reduce the GPU workload.
Judging from my own experiences with a Geforce 8600 and an Intel HD4000 in the past I'd say once these drop below 2%, we can consider borderless fullscreen the only way to go. I'd really be glad if this godforsaken legacy crap could finally be dumped for good. With my current round of refactoring it has become the major roadblock to doing it in a way that would benefit a new Vulkan backend. While GL2 and GL4.5 can be driven by the same logic, Vulkan can not. And the logic that is needed for GL 2.0 is very suboptimal on GL 3+, so I guess once the stuff got sufficiently separated I'm just going to split off the GL2 part entirely and just leave it alone until it can finally be tossed out.
Post Reply

Return to “Closed Bugs [GZDoom]”