From ccb06e4952b88697614ac55141ff1eaf663e3065 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sun, 21 Jul 2013 00:57:31 -0400 Subject: [PATCH] Add support for the _NET_WM_BYPASS_COMPOSITOR hint This hints to window managers to unredirect the window to improve performance. --- src/video/x11/SDL_x11window.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c index 3e9062b50..5bf6ee43a 100644 --- a/src/video/x11/SDL_x11window.c +++ b/src/video/x11/SDL_x11window.c @@ -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[] = {