4 ms·
Regarding "hybrid" compositors, I believe there used to be a few that had an "un-redirect fullscreen windows" feature that essentially did what you're suggestin
by Crespyl 6y ago
Regarding "hybrid" compositors, I believe there used to be a few that had an "un-redirect fullscreen windows" feature that essentially did what you're suggesting. I think there was some sort of difficulty with doing this for regular/non-fullscreen windows and still having a consistent/smooth experience with the rest of the features you'd want out of a compositor.
These days, at least in KWin land, there's just an "allow applications to block compositing" feature that automatically disables compositing (globally) when it makes sense. I'm not sure exactly what rules trigger it (simply putting, say, FireFox, into fullscreen doesn't do it, but Dota 2 does), but it seems to work pretty well.
- Jasper_ 6y agoSDL2 sets this on windows by default, which is likely what's doing it: https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html#idm46035372472224 https://specifications.freedesktop.org/wm-spec/wm-spec-lates... Compositing is required for any sort of antialiasing, especially including window borders, so it's difficult to turn off without having a lot of artifacts. And it also solves vsync which a lot of raw X11 applications can't possibly render correctly with.
- badsectoracula 6y agoI implemented fullscreen OpenGL in my 3D engine a few years ago and this was kind of an interesting part. It was one of the hardest to get right, especially if you want to avoid dictating sort of WM your users will have to use (which IMO is one of X11 strengths over pretty much any other desktop GUI). Some window managers treat any window that covers the entire screen as being fine to bypass composition. Other window managers need hints - which will be ignored by some other window managers. And a few compositors simply seem to ignore any hint or window state, but they will disable composition for fullscreen windows that also bypass window management (which in general is kind of a "nuclear option" for fullscreen modes since it also bypasses other window manager functionality like alt-tab, etc). Also as a cherry on top, i had a window manager which refused to treat the window as a fullscreen window (added borders, etc) unless i set up things in a very specific order (which i found out via trial and error because normally it shouldn't be an issue - and wasn't in every other window manager i tried). (that last part was kinda interesting because i downloaded every window manager i could find on Debian and after i tested my code and debugged it with everything i could get my hands on, i sent it to a friend of mine to try it out and he immediately told me that in his computer he got borders :-P) Should be noted that neither SDL1 nor SDL2 (which are pretty much recommended by people who haven't bothered to create their own engines as "obvious" solutions to not have to bother with OS-specific stuff) handled all the above (SDL1 always bypasses the window manager, which in general works but disables alt-tabbing and other WM functionality whereas SDL2 assumes all window managers support the fullscreen hint, which is certainly not the case - especially with more minimalistic window managers - while compositor support is hit and miss).