From 9e86908a4777215578453a7993738de777ad0ec7 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 9 Dec 2021 20:23:09 +0100 Subject: [PATCH] (Windows) Fixed a window focusing issue when hiding the taskbar. --- es-app/src/main.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/es-app/src/main.cpp b/es-app/src/main.cpp index f0c6b9107..37e8d6d0b 100644 --- a/es-app/src/main.cpp +++ b/es-app/src/main.cpp @@ -459,18 +459,6 @@ int main(int argc, char* argv[]) outputToConsole(true); #endif -#if defined(_WIN64) - // Hide taskbar if the setting for this is enabled. - bool taskbarStateChanged = false; - unsigned int taskbarState; - - if (Settings::getInstance()->getBool("HideTaskbar")) { - taskbarStateChanged = true; - taskbarState = getTaskbarState(); - hideTaskbar(); - } -#endif - #if defined(FREEIMAGE_LIB) // Call this ONLY when linking with FreeImage as a static library. FreeImage_Initialise(); @@ -567,6 +555,18 @@ int main(int argc, char* argv[]) SDL_SetRelativeMouseMode(SDL_TRUE); #endif +#if defined(_WIN64) + // Hide taskbar if the setting for this is enabled. + bool taskbarStateChanged = false; + unsigned int taskbarState; + + if (Settings::getInstance()->getBool("HideTaskbar")) { + taskbarStateChanged = true; + taskbarState = getTaskbarState(); + hideTaskbar(); + } +#endif + if (splashScreen) { std::string progressText = "Loading..."; if (splashScreenProgress)