XVidMode/Xinerama removal also removed Linux no-window-manager fullscreen functionality
I was developing some automated integration tests for Factorio and ran into a problem. The game (optionally) wants to run fullscreen, so it calls SDL_SetWindowFullscreen and that leads to X11_SetWindowFullscreen which sends _NET_WM_STATE_FULLSCREEN. Without a wm, that message is lost to the void. X11_SyncWindow waits 100ms for a response then gives up. SDL_WINDOW_FULLSCREEN isn't set and SDL_EVENT_WINDOW_ENTER_FULLSCREEN isn't sent. However, SDL_SetWindowFullscreen still returns true(!?). That seems like a bug, and the blunt fix would be to change the reported results.
However, the rabbit hole goes a little deeper. When https://github.com/libsdl-org/SDL/commit/7d7ec9c95146c44d4b4643ed552796bf07937057 removed support for XVidMode and Xinerama display mode changes, it also threw away the "just maximize the window ourself if we're already in the right resolution and there's no WM" code path of X11_BeginWindowFullscreenLegacy when window->internal->videodata->net_wm is false.
I think this was an unintentional and unnoticed regression. I propose reviving just that small subset of functionality, adding an alternate code path in the no-wm scenario that does the window resize / move / raise directly. At least in my use case, this would satisfy the downstream expectations of having a window the size of the screen with nothing in front of it.
AI Disclosure: I read the mentioned functions and their call sites and understand what they are doing, with the exception of some of the parts of SDL_UpdateFullscreenMode that aren't exercised here. I read the commit that removed the functionality in question. I wrote this entire issue myself explaining my understanding of the problem. I used Claude Opus 5 to point me at the code path leading to the undesired behavior that I had encountered and to track the git and hg history back to that commit.
Source: libsdl-org/SDL