X11: _NET_WM_BYPASS_COMPOSITOR hint

This hint is already supported by Gnome’s Mutter, and will be supported in near future by KDE’s KWin.
Description on freedesktop.org: http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#idp6357888

I made patches for KWin and SDL 2. Patch for SDL is here:

diff -r 728e5f22a82f src/video/x11/SDL_x11window.c
— a/src/video/x11/SDL_x11window.c Thu Jun 13 22:30:02 2013 -0700
+++ b/src/video/x11/SDL_x11window.c Fri Jun 14 16:17:04 2013 +0700
@@ -1028,6 +1028,13 @@
}
}

  • {
  •    Atom _NET_WM_BYPASS_COMPOSITOR = XInternAtom(display, "_NET_WM_BYPASS_COMPOSITOR", False);
    
  •    unsigned long value = fullscreen ? 1 : 0;
    
  •    XChangeProperty(display, data->xwindow, _NET_WM_BYPASS_COMPOSITOR,
    
  •                    XA_CARDINAL, 32, PropModeReplace, (unsigned char*)&value, 1);
    
  • }+
    XFlush(display);
    }

Maybe not the best way, but it works, at least together with patched KWin.