diff options
Diffstat (limited to 'platform/windows/display_server_windows.cpp')
-rw-r--r-- | platform/windows/display_server_windows.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index f971846959..0fbca9ae8c 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -30,12 +30,16 @@ #include "display_server_windows.h" +#include "os_windows.h" + #include "core/io/marshalls.h" -#include "core/math/geometry_2d.h" #include "main/main.h" -#include "os_windows.h" #include "scene/resources/texture.h" +#if defined(GLES3_ENABLED) +#include "drivers/gles3/rasterizer_gles3.h" +#endif + #include <avrt.h> #include <dwmapi.h> @@ -43,10 +47,6 @@ #define DWMWA_USE_IMMERSIVE_DARK_MODE 20 #endif -#if defined(GLES3_ENABLED) -#include "drivers/gles3/rasterizer_gles3.h" -#endif - #if defined(__GNUC__) // Workaround GCC warning from -Wcast-function-type. #define GetProcAddress (void *)GetProcAddress @@ -835,9 +835,12 @@ void DisplayServerWindows::show_window(WindowID p_id) { SetFocus(wd.hWnd); // Set keyboard focus. } else if (wd.minimized) { ShowWindow(wd.hWnd, SW_SHOWMINIMIZED); - } else if (wd.no_focus || wd.is_popup) { + } else if (wd.no_focus) { // https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-showwindow ShowWindow(wd.hWnd, SW_SHOWNA); + } else if (wd.is_popup) { + ShowWindow(wd.hWnd, SW_SHOWNA); + SetFocus(wd.hWnd); // Set keyboard focus. } else { ShowWindow(wd.hWnd, SW_SHOW); SetForegroundWindow(wd.hWnd); // Slightly higher priority. |