Open orowith2os opened 1 year ago
Turns out GNOME has this - it's just not exposed in the super+right click menu by default, and only as an unbound shortcut. You can force fullscreen any window you want. I'm not sure if gamescope needs to do anything else here, or if it can do anything here. Is it possible for gamescope to not unfocus when running maximized and focus is lost?
Gamescope already has this, Win + F... --fullscreen is also borderless.
If it is not then something is wrong but it works on my machine on KDE and LabWC.
I recall gamescope consistently minimizing when it loses focus on my system (GNOME), even with fullscreen. Only borderless and windowed don't minimize.
I'm rebuilding gamescope to see if I can reproduce it on my laptop.
I've tried to reproduce the issue and here's how gamescope
acts with the different window options on my system. I've got package versions at the bottom. Throughout this I will be referring to terms such as Windowed, Borderless and Fullscreen in various combinations. For a fuller understanding of what these mean please refer to the PCGaminkWiki's article: link
gamescope
(default)A window like any other GUI program with a border (decorations). Can be minimised
https://github.com/ValveSoftware/gamescope/assets/19249443/f726afaa-632c-47b5-97e7-5308261ba0f4
gamescope --borderless
or -b
A window without any border. Can be minimised
https://github.com/ValveSoftware/gamescope/assets/19249443/e3baa6fa-baa4-49b9-9dce-0c8e8bfbb871
gamescope --fullscreen
or -f
A window without any border that is maximised to use the entire screen. Can't be minimised
https://github.com/ValveSoftware/gamescope/assets/19249443/0eaa3eab-1366-4875-bee1-7605bc9602ee
I don't think gamescope
will ever minimise itself on focus loss unless you have something interfearing with that. Since you use gnome I'd recommend checking out any extensions you might have.
I had this same issue as described by @orowith2os, using Nobora linux (based on Fedora 38) and Gnome 45.
When launching with -f
the window tried to fullscreen but it still had a title bar and window controls.
Issue #985 is also a duplicate of this, so it is affecting others too.
I did some pretty extensive digging, looking at how gamescope uses SDL2 to configure a child window, it uses SDL_WINDOW_FULLSCREEN_DESKTOP
mode, that should be a borderless fullscreen mode, and indeed that used to work on Gnome on earlier versions of Gnome and earlier versions of SDL2.
I tracked the problem down to SDL2's use of libdecor in newer versions of SDL2 on Gnome.
Mutter Wayland does indeed have a true fullscreen mode that windows can run in, but looking through the mutter code, there are only two codepaths that trigger windows to enter true fullscreen. First is the global shortcut, (disabled by default) configurable through the Gnome settings panel, you can set eg. ctrl+alt+shift+f to force the mutter wayland compositor to enable true fullscreen mode (and bonus, unredirect compositing) on that window. The second code path is through xdg-shell (specifically, xdg_toplevel_set_fullscreen()
). So wayland client apps can use the xdg-shell protocol to set their client window to true fullscreen that way.
SDL2 has supported xdg-shell for a long time, and it does work correctly, the problem is newer versions of SDL2 detect the presence of libdecor on the system, and supported by the compositor (mutter), so it uses libdecor to set up the wayland window, instead of xdg-shell. The use of the combination of SDL_WINDOW_FULLSCREEN_DESKTOP
mode, along with libdecor cause the window to be drawn maximised with client-side title-bar and window controls. That's not what we want.
I don't know if that should be fixed in SDL2, or in libdecor, but in any case, I can work around it in Gamescope with the very helpful libdecor killswitch:
env SDL_VIDEO_WAYLAND_PREFER_LIBDECOR=0 gamescope -f -- glxgears
.
Now it works exactly as expected, and same as it does on KDE Plasma.
Borderless Fullscreen Windowed |
gamescope --fullscreen
or-f
A window without any border that is maximised to use the entire screen. Can't be minimised
I tried this in XFCE with Nvidia 545 with specifically command line gamescope -f -- vkgears
and I was able to minimize the window by using my window-switching bind (alt-tab) to switch away from it and using the usual panel task button's "Minimize" right-click context menu entry. The only thing that I can normally do that I couldn't do with this window is move it around and resize it with my usual XFWM Super+LMB and Super+RMB binds respectively. Other windows can go on top of it and it can be minimized here, so it's almost as good as a full borderless fullscreen windowed mode, at least in XFWM.
Essentially a dupe (and revival) of https://github.com/ValveSoftware/gamescope/issues/109
Gamescope currently has three window types:
It would make life better for me, and probably many others, to have a "Fullscreen borderless window" option, with many having multiple monitors and wanting to use gamescope in fullscreen without it minimizing on focus loss.