Fix reversed window blur/focus logic for web (#5590)

This commit is contained in:
Borin Ouch 2026-02-25 03:35:34 -08:00 • committed by GitHub
commit ad82393bb8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1482,8 +1482,8 @@ static void WindowIconifyCallback(GLFWwindow *window, int iconified)
// GLFW3: Called on windows get/lose focus
static void WindowFocusCallback(GLFWwindow *window, int focused)
{
if (focused) FLAG_SET(CORE.Window.flags, FLAG_WINDOW_UNFOCUSED); // The window was focused
else FLAG_CLEAR(CORE.Window.flags, FLAG_WINDOW_UNFOCUSED); // The window lost focus
if (focused) FLAG_CLEAR(CORE.Window.flags, FLAG_WINDOW_UNFOCUSED); // The window was focused
else FLAG_SET(CORE.Window.flags, FLAG_WINDOW_UNFOCUSED); // The window lost focus
}
// GLFW3: Called on file-drop over the window