ZeroK-RTS / Zero-K

Open source RTS game running on the Spring/Recoil engine
https://zero-k.info
GNU General Public License v2.0
686 stars 205 forks source link

All Display Mode choices on Win10 have problems #2940

Closed ghost closed 5 years ago

ghost commented 6 years ago

All display mode choices have some degree of problems for me Fullscreen prevents alt-tab from functioning Borderless window displays beneath windows taskbar and has the occasional shifting down-right strangeness Manual borderless also displays beneath taskbar Windowed mode constrains mouse input, this is a good thing to prevent accidental clicking of close X, but it's not communicated anywhere that you can release your mouse boundaries with /grabinput

With the exception of windowed mode choices, I have experienced these problems on occasion with other games on Win10, so I am assuming these are SDL2 problems.

I can fix all the issues with borderless window by downloading SDL2-2.0.8-win32-x86.zip from https://www.libsdl.org/download-2.0.php and dropping the .dll in /Zero-K/ folder. Fullscreen preventing alt-tab is still present.

GoogleFrog commented 6 years ago

I am unconvinced, is borderless beneath the taskbar 100% reproducible?

ghost commented 6 years ago

It doesn't happen 100% of the time, but when It does happen it's hard to get rid of, as it can render top right menu inaccessible. SDL may be a red herring.

ghost commented 6 years ago

I can't reproduce this at all anymore.

Porkch0p commented 5 years ago

I can reproduce 'Fullscreen prevents alt-tab from functioning' by having 'Settings/Interface/Mouse Cursor/Lock Cursor to Window' enabled on Windows 7. It seems to be related to the Update method trying to repeatedly grab control of the screen when the feature is enabled.

I made an updated api_grabinput.lua widget that controls mouse lock, adding a 'Settings/Interface/Mouse Cursor/Pausing disables lock' checkbox that makes Fullscreen behave in a normal way when the game is paused, and seems to pair well with using borderless windowed.

Source is at https://github.com/Porkch0p/Zero-K/tree/mouseLockPauseToggle

Porkch0p commented 5 years ago

On reproducing the other issues (Win7), if the game is set to Fullscreen and lobby set to Borderless Window, when exiting a game from Fullscreen it briefly draws a fullscreen-sized window (i.e. 1920x1080 plus borders) and then hides the border without adjusting its contents, leaving a border-sized gap above the lobby showing desktop. The lobby is also partially hidden behind the taskbar.

Porkch0p commented 5 years ago

There's some even more weird behavior with Game=Fullscreen,Lobby=Borderless Window in that it leaves a permanent border-sized gap at the top of the lobby across restarts of Zero-K.exe. (On Windows 7)

I can get it to fix itself or stay broken, and it appears to be related to the settings you first load your first Skirmish. My guess would be the client is caching some information about the meaning of 'fullscreen' that isn't always consistent...?

To Replicate:

Path A: After the gap is showing on a fresh restart, if your first Skirmish is Game=Fullscreen,Lobby=Borderless Window, the game will be fullscreen, and exit back to a Lobby with a gap. If you then set Game=Borderless Window,Lobby=Borderless Window, and start a second Skirmish, the game will be in Borderless+Gap, and the lobby stays in Borderless+Gap. Future Skirmishes are the same way.

Path B: After the gap is showing on a fresh restart, if your first Skirmish is Game=Borderless Window,Lobby=Borderless Window, the Skirmish loads normally, resizing to the full screen, and returns to the lobby keeping borderless fullscreen.

If you do the first option, the gap will fix itself and stay gone once you close and re-open Zero-K.exe, after your first Skirmish using Game=Borderless Window,Lobby=Borderless Window

GoogleFrog commented 5 years ago

Actually I am just closing this. Reopening year-old tickets with slightly different bugs is not the way to use ticketing systems. Tickets should be directly related to their opening comment. Leaving this open will just confuse me the next time I search for this topic as I will look at the first comment and think that the name does not match the ticket.

Create a new ticket will all the information relevant to the new issue in the opening comment.