Originally posted by asdfblah
View Post
User starts a game -> game tells compositor its a "take over the computer" app like a game (or Kodi or Steam Picture Mode) -> compositor like Kwin says "alright" and spins up another wayland VT, reparents the game to that, switches to it, and suspends itself so its not burning system resources.
The only logic there is really notifying the compositor a game is running (which the game binary itself doesn't even need to do, something like Steam could do it for it) so it can generate a new VT and run the game on it rather than itself. SDL would need some updates to handle running EGL right on DRM, plus I'm not sure what setup libinput takes on a Wayland session that might need done, but it could probably include that functionality or spin it off into a minimalist "fullscreen program" Wayland server.
The game itself doesn't need to do anything, though, as long as its not directly calling X functionality. If changes were needed in SDL and the game were shipping against an old version (such as the Steam Runtime) it would need to be updated.
The only complications really are external programs running on the original desktop like OBS or Tox. If you switch VTs and halt Kwin and everything on top of it you freeze up the rest of your software. It would also mean in a multi-monitor setup either you run the game across all monitors or you are going to have dead screens.
Comment