Skip to contentSkip to conversation

SDL: set a hint to not bypass the window compositor

PATCH In review Sebastian Krzyszkowiak 2 participants 2 messages Oct 24, 2018 – Oct 29, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SDL: set a hint to not bypass the window compositor

Without that, window effects in KWin get suspended as soon as any qemu-sdl window becomes visible. While the SDL default makes sense for games, it's not really suitable for QEMU.

---
 ui/sdl2.c | 3 +++
 1 file changed, 3 insertions(+)
ui/sdl2.c +3 -0
index 2696b95c79..a10b6e3a08 100644
@@ -786,6 +786,9 @@ static void sdl2_display_init(DisplayState *ds, DisplayOptions *o)
                 SDL_GetError());
         exit(1);
     }
+#ifdef SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR /* only available since SDL 2.0.8 */
+    SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0");
+#endif
     SDL_SetHint(SDL_HINT_GRAB_KEYBOARD, "1");
     memset(&info, 0, sizeof(info));
     SDL_VERSION(&info.version);
Signature · 1 line
2.19.1
#1 lore raw
Quoted 5 lines · Sebastian Krzyszkowiak

Without that, window effects in KWin get suspended as soon as any qemu-sdl window becomes visible. While the SDL default makes sense for games, it's not really suitable for QEMU.

Added to UI patch queue.

thanks,
Gerd