diff -r 91138f56d762 include/SDL_hints.h --- a/include/SDL_hints.h Sun Oct 29 14:15:00 2017 +0300 +++ b/include/SDL_hints.h Sat Feb 17 01:18:15 2018 +1030 @@ -212,6 +212,18 @@ #define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING" /** + * \brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used. + * + * This variable can be set to the following values: + * "0" - Disable _NET_WM_BYPASS_COMPOSITOR + * "1" - Enable _NET_WM_BYPASS_COMPOSITOR + * + * By default SDL will use _NET_WM_BYPASS_COMPOSITOR + * + */ +#define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR" + +/** * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden * * This variable can be set to the following values: diff -r 91138f56d762 src/video/x11/SDL_x11window.c --- a/src/video/x11/SDL_x11window.c Sun Oct 29 14:15:00 2017 +0300 +++ b/src/video/x11/SDL_x11window.c Sat Feb 17 01:18:15 2018 +1030 @@ -579,11 +579,12 @@ wintype = X11_XInternAtom(display, wintype_name, False); X11_XChangeProperty(display, w, _NET_WM_WINDOW_TYPE, XA_ATOM, 32, PropModeReplace, (unsigned char *)&wintype, 1); - - _NET_WM_BYPASS_COMPOSITOR = X11_XInternAtom(display, "_NET_WM_BYPASS_COMPOSITOR", False); - X11_XChangeProperty(display, w, _NET_WM_BYPASS_COMPOSITOR, XA_CARDINAL, 32, - PropModeReplace, - (unsigned char *)&compositor, 1); + if (SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, SDL_TRUE)) { + _NET_WM_BYPASS_COMPOSITOR = X11_XInternAtom(display, "_NET_WM_BYPASS_COMPOSITOR", False); + X11_XChangeProperty(display, w, _NET_WM_BYPASS_COMPOSITOR, XA_CARDINAL, 32, + PropModeReplace, + (unsigned char *)&compositor, 1); + } { Atom protocols[3];