From 7aa462e43d6f3e1c4f7ab035ae07353d60387f71 Mon Sep 17 00:00:00 2001 From: Daniele Laudani Date: Wed, 3 Jun 2020 14:38:44 +0200 Subject: [PATCH 1/2] Don't tell the system to disable compositing under X11 Fixes #123 --- src/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.c b/src/main.c index c739f5f..69ff28c 100644 --- a/src/main.c +++ b/src/main.c @@ -69,6 +69,11 @@ int main(int argc, char **argv) { #endif SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS); + +#ifdef SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR /* Available since 2.0.8 */ + SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0"); +#endif + SDL_EnableScreenSaver(); SDL_EventState(SDL_DROPFILE, SDL_ENABLE); atexit(SDL_Quit); From 95ee03fb373806fcfc01a91113d3aef41ed50a4b Mon Sep 17 00:00:00 2001 From: Daniele Laudani Date: Wed, 3 Jun 2020 15:05:55 +0200 Subject: [PATCH 2/2] move BYPASS_COMPOSITOR near other SetHint --- src/main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main.c b/src/main.c index 69ff28c..abafd2b 100644 --- a/src/main.c +++ b/src/main.c @@ -69,14 +69,13 @@ int main(int argc, char **argv) { #endif SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS); - -#ifdef SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR /* Available since 2.0.8 */ - SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0"); -#endif - SDL_EnableScreenSaver(); SDL_EventState(SDL_DROPFILE, SDL_ENABLE); atexit(SDL_Quit); + +#ifdef SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR /* Available since 2.0.8 */ + SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0"); +#endif #if SDL_VERSION_ATLEAST(2, 0, 5) SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1"); #endif