Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Add support for the _NET_WM_BYPASS_COMPOSITOR hint
Browse files Browse the repository at this point in the history
This hints to window managers to unredirect the window to improve
performance.
  • Loading branch information
magcius committed Jul 21, 2013
1 parent f80f765 commit 7f5b43b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/video/x11/SDL_x11window.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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[] = {
Expand Down

0 comments on commit 7f5b43b

Please sign in to comment.