diff --git a/README.md b/README.md index 3fce2f8c2..40719689d 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ information on what to include when reporting a bug. ## Changelog -User-visible changes since the last release. +* [Win32] Bugfix: Worker threads are now able to correctly detect if the GLFW window has focus by getting the `GLFW_FOCUSED` attribute. ## Contact diff --git a/src/win32_window.c b/src/win32_window.c index c022b5bae..d6c28fb9c 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)