From 859d8b96a799e5b68034aedacf293a121f02c851 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 17 Jan 2022 19:25:43 -0600 Subject: [PATCH] Don't use duplicate resize workaround on SDL 2.0.21+ --- app/streaming/session.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/streaming/session.cpp b/app/streaming/session.cpp index 50bfaf00..f1a33119 100644 --- a/app/streaming/session.cpp +++ b/app/streaming/session.cpp @@ -1402,8 +1402,10 @@ void Session::execInternal() // As of SDL 2.0.20, we get duplicate SDL_WINDOWEVENT_SIZE_CHANGED events // when focus is lost and gained under GNOME Wayland. This causes us to - // recreate our renderer needlessly. + // recreate our renderer needlessly. This is fixed in SDL 2.0.21. +#if !SDL_VERSION_ATLEAST(2, 0, 21) ignoreDuplicateResizes = true; +#endif } else { // X11/XWayland: Capture after decoder creation