Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fullscreen games running in xwayland become non-functional once focus is lost #475

Open
Dekomoro opened this issue May 10, 2024 · 11 comments

Comments

@Dekomoro
Copy link

Dekomoro commented May 10, 2024

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 #442 and #460

@ids1024
Copy link
Member

ids1024 commented May 10, 2024

This could be related to #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?

@Dekomoro
Copy link
Author

It appears it does

@Dekomoro
Copy link
Author

It definitely seems to be related to fullscreen apps minimizing. Which happens to function when wayland apps do it.

@Dekomoro
Copy link
Author

Also happens both in tiling and floating modes if that info helps

@ids1024
Copy link
Member

ids1024 commented May 10, 2024

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.

@Dekomoro
Copy link
Author

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

@onlyreportingissues
Copy link

onlyreportingissues commented May 12, 2024

This might be useful: labwc/labwc#960

"view: add minimize method and call wlr_xwayland_surface_set_minimized() for xwayland surfaces on (un)minimize"

(Jun 25, 2023)

@Dekomoro
Copy link
Author

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

@Dekomoro
Copy link
Author

xwayland in rootful fullscreen does not appear to exhibit this issue

@Dekomoro
Copy link
Author

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

@Dekomoro
Copy link
Author

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. Smithay/smithay#1336

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants