Mode changes not working in XWayland
I'm not sure when it changed, but I'm running on Ubuntu 22.04 with the default desktop and setting a fullscreen mode doesn't work under XWayland. The XRandR calls appear to work, but the window remains the size of the original desktop.
This affects both SDL2 and SDL3.
@Kontrabant, @misyltoad, do you have any insight here?
XWayland, not sure why SDL3 picks x11 over wayland by default on a wayland session
KDE
Fedora 42
Same issue here, after creating a SDL_WINDOW_FULLSCREEN window and SDL_SyncWindow
SDL_WINDOW_FULLSCREENflag is still setSDL_GetWindowFullscreenModereturnsNULLindicating the window is inSDL_WINDOW_BORDERLESSmode?- the same happens with
SDL_VIDEO_DRIVER=wayland
Never mind my comment, the docs of SDL_SetWindowFullscreen explain this case.
By default a window in fullscreen state uses borderless fullscreen desktop mode, but a specific exclusive display mode can be set using SDL_SetWindowFullscreenMode().
Possibly related: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1797
Possibly related: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1797
I'm completely lost when trying to figure out how to apply that fix; I think it might be something else.
The xwayland branch in use by Linux desktop did not introduce this exact regression from what I can tell, and compiling it still does not result in this working properly.
Has this ever worked on Wayland sessions? ~~What is the last known good xwayland version?~~ Unfortunately, anything prior to 24.1.0 does not work at all ("DRI3 missing"), so testing it like that might be difficult.
It has definitely worked before, although if the linked issue didn't cause it, I'm not sure when it broke. The only way to tell would be to start bisecting.
I just found an open upstream issue regarding the problem as well: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1803
Ah, I already managed to report my own: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1823, sorry for that. I included a simple reproducer there, hopefully that helps the xserver maintainers.