mirror of
https://github.com/yawut/SDL.git
synced 2026-09-09 01:26:24 -05:00
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:
@@ -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[] = {
|
||||
|
||||
Reference in New Issue
Block a user