Add support for the _NET_WM_BYPASS_COMPOSITOR hint

This hints to window managers to unredirect the window to improve
performance.
This commit is contained in:
Jasper St. Pierre 2013-07-21 00:57:31 -04:00
parent 44a6ab168b
commit 223c2cfbd7

View file

@ -339,6 +339,8 @@ X11_CreateWindow(_THIS, SDL_Window * window)
XSizeHints *sizehints;
XWMHints *wmhints;
XClassHint *classhints;
const long _NET_WM_BYPASS_COMPOSITOR_HINT_ON = 1;
Atom _NET_WM_BYPASS_COMPOSITOR;
Atom _NET_WM_WINDOW_TYPE;
Atom _NET_WM_WINDOW_TYPE_NORMAL;
Atom _NET_WM_PID;
@ -532,6 +534,10 @@ X11_CreateWindow(_THIS, SDL_Window * window)
PropModeReplace,
(unsigned char *)&_NET_WM_WINDOW_TYPE_NORMAL, 1);
_NET_WM_BYPASS_COMPOSITOR = XInternAtom(display, "_NET_WM_BYPASS_COMPOSITOR", False);
XChangeProperty(display, w, _NET_WM_BYPASS_COMPOSITOR, XA_CARDINAL, 32,
PropModeReplace,
(unsigned char *)&_NET_WM_BYPASS_COMPOSITOR_HINT_ON, 1);
{
Atom protocols[] = {