(Windows) Fixed a window focusing issue when hiding the taskbar.

This commit is contained in:
Leon Styhre 2021-12-09 20:23:09 +01:00
parent 171679efa9
commit 9e86908a47

View file

@ -459,18 +459,6 @@ int main(int argc, char* argv[])
outputToConsole(true); outputToConsole(true);
#endif #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) #if defined(FREEIMAGE_LIB)
// Call this ONLY when linking with FreeImage as a static library. // Call this ONLY when linking with FreeImage as a static library.
FreeImage_Initialise(); FreeImage_Initialise();
@ -567,6 +555,18 @@ int main(int argc, char* argv[])
SDL_SetRelativeMouseMode(SDL_TRUE); SDL_SetRelativeMouseMode(SDL_TRUE);
#endif #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) { if (splashScreen) {
std::string progressText = "Loading..."; std::string progressText = "Loading...";
if (splashScreenProgress) if (splashScreenProgress)