Does X11 actually have a native fullscreen mode?
I'm writing some OpenGL graphics demos on a Linux-based system, and from what I can gather the X server doesn't seem to actually have a native fullscreen mode as you'd expect with games, etc. From what I understand, X is always just "windows." Therefore, it would seem "fullscreen" on X just means "fullscreen borderless window" in Windows PC terms. The graphics driver, I assume, just detects the window is converting the entire screen and sets itself appropriately. Am I completely wrong here? Or is everything literally just a window?
Solution 1:
The old post of X11/GLX - Fullscreen mode? has some useful data on the subject.
The best (but not most upvoted) answer for me contains the following code:
Atom wm_state = XInternAtom (display, "_NET_WM_STATE", true );
Atom wm_fullscreen = XInternAtom (display, "_NET_WM_STATE_FULLSCREEN", true );
XChangeProperty(display, window, wm_state, XA_ATOM, 32,
PropModeReplace, (unsigned char *)&wm_fullscreen, 1);
Which is further described in Extended Window Manager Hints:
_NET_WM_STATE_FULLSCREEN indicates that the window should fill the entire screen and have no window decorations. Additionally the Window Manager is responsible for restoring the original geometry after a switch from fullscreen back to normal window. For example, a presentation program would use this hint.
That's the situation at the moment, which is not perfect. The Proposal To Fix The Full-Screen Linux Window Mess does not seem to have been implemented.