From cbd0e93d0f78ac9614ec21f450d31484b4e8273e Mon Sep 17 00:00:00 2001 From: Luiz Monclar Date: Wed, 17 Apr 2019 01:51:24 -0300 Subject: [PATCH] Replace 'GetActiveWindow()' calls with 'GetForegroundWindow()' for the win32 platform --- src/win32_window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/win32_window.c b/src/win32_window.c index c022b5bae..228585e9d 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -1788,7 +1788,7 @@ void _glfwPlatformSetWindowMonitor(_GLFWwindow* window, int _glfwPlatformWindowFocused(_GLFWwindow* window) { - return window->win32.handle == GetActiveWindow(); + return window->win32.handle == GetForegroundWindow(); } int _glfwPlatformWindowIconified(_GLFWwindow* window) @@ -1918,7 +1918,7 @@ void _glfwPlatformPollEvents(void) } } - handle = GetActiveWindow(); + handle = GetForegroundWindow(); if (handle) { // NOTE: Shift keys on Windows tend to "stick" when both are pressed as