From 47df6c9d66c492318c8102bde50cd3530ffb22ce Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Sun, 14 Feb 2021 22:51:07 -0500 Subject: [PATCH] Ignore resize events for unfocused windows --- desktop_version/src/KeyPoll.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/desktop_version/src/KeyPoll.cpp b/desktop_version/src/KeyPoll.cpp index 16fab84b..051d4fe9 100644 --- a/desktop_version/src/KeyPoll.cpp +++ b/desktop_version/src/KeyPoll.cpp @@ -252,7 +252,12 @@ void KeyPoll::Poll() { /* Window Resize */ case SDL_WINDOWEVENT_RESIZED: - resetWindow = true; + if (SDL_GetWindowFlags( + SDL_GetWindowFromID(evt.window.windowID) + ) & SDL_WINDOW_INPUT_FOCUS) + { + resetWindow = true; + } break; /* Window Focus */