Open Dekomoro opened 1 month ago
This could be related to https://github.com/pop-os/cosmic-comp/issues/231. I fixed one issue related to that, but there seem to be more problems.
For Linux-native SDL games, does setting SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0
help here?
It appears it does
It definitely seems to be related to fullscreen apps minimizing. Which happens to function when wayland apps do it.
Also happens both in tiling and floating modes if that info helps
Hm, odd that disabling SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS
doesn't help, since I've seen that help.
We have several issues with Xwayland still. There's a lot of subtle details in getting the X window manager logic to play along with all clients.
Testing on Arch Linux it exhibits different behavior, Terraria freezes on focus lost with SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS set to 0, but crashes if it's set to 1
This might be useful: https://github.com/labwc/labwc/pull/960
"view: add minimize method and call wlr_xwayland_surface_set_minimized() for xwayland surfaces on (un)minimize"
(Jun 25, 2023)
Testing on Arch Linux it exhibits different behavior, Terraria freezes on focus lost with SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS set to 0, but crashes if it's set to 1
Apparently the crashing was just an issue with the game, games just freeze in fullscreen in general now, but not in borderless windowed
xwayland in rootful fullscreen does not appear to exhibit this issue
I happened to use xwayland-run to attempt this which technically spawns a new xwayland instance with arguments I choose. I just use the arguments -fullscreen -geometry 1920x1080
github is weird and my message dissappeared but it does seem to be related to, as my issues only appear to happen when direct scan out is triggered. https://github.com/Smithay/smithay/issues/1336
This includes freezing, black screens, other artifacts.
Tested with various games that I've found to work with Wayland and X11(using the SDL_VIDEODRIVER variable) including Terraria, Factorio, and Team Fortress 2. Wine games seem to always exhibit this behavior including ones that lose focus on launch.
Typically is gauranteed to happen if you move your mouse off the fullscreen game onto another monitor.
Seems related to https://github.com/pop-os/cosmic-comp/issues/442 and https://github.com/pop-os/cosmic-comp/issues/460