From 0f0a9227fd35a3fdf514803c714f337afc9a11e2 Mon Sep 17 00:00:00 2001 From: "Amine B. Hassouna" Date: Sat, 1 Dec 2018 15:27:15 +0100 Subject: [PATCH] Disable compositor bypass --- src/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main.c b/src/main.c index d6d2830..6cc710c 100644 --- a/src/main.c +++ b/src/main.c @@ -51,6 +51,15 @@ int main(int argc, char* argv[]) return 0; } +#if linux && SDL_VERSION_ATLEAST(2, 0, 8) + // Disable compositor bypass + if(!SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0")) + { + printf("SDL can not disable compositor bypass!\n"); + return 0; + } +#endif + // Create window SDL_Window *window = SDL_CreateWindow("Basic C SDL project", SDL_WINDOWPOS_UNDEFINED,