From 9712cb8123502152ec6932a709c7d8de7ea02eb5 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Fri, 31 May 2019 15:35:53 +0200 Subject: [PATCH] Do not minimize on focus loss The default behavior seems annoying. Fixes --- app/src/scrcpy.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/scrcpy.c b/app/src/scrcpy.c index 6cc0a3ec..0264561b 100644 --- a/app/src/scrcpy.c +++ b/app/src/scrcpy.c @@ -76,6 +76,11 @@ sdl_init_and_configure(bool display) { } #endif + // Do not minimize on focus loss + if (!SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0")) { + LOGW("Could not disable minimize on focus loss"); + } + // Do not disable the screensaver when scrcpy is running SDL_EnableScreenSaver();