From 24565749928304a91dec5365e080c8f6432d0880 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 9 Jun 2025 06:52:56 +0530 Subject: [PATCH] Wayland: Only rely on keyboard enter/leave events for OS window focus state GNOME has broken activated==focused assumption GLFW used to make. Also follows upstream GLFW behavior. https://github.com/glfw/glfw/commit/c2f0a0ae5990a23d84c3f4529771b1268a34f918 Fixes #8716 --- docs/changelog.rst | 3 +++ glfw/wl_window.c | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 32c6dc7a6..535fba2de 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -123,6 +123,9 @@ Detailed list of changes - Graphics protocol: Add a note clarifying image update behavior on re-transmission (:iss:`8701`) +- Wayland GNOME: Fix incorrect OS Window tracking because GNOME has started + activating windows on non-current workspaces (:iss:`8716`) + 0.42.1 [2025-05-17] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/glfw/wl_window.c b/glfw/wl_window.c index 46b4190ac..ec9dbb032 100644 --- a/glfw/wl_window.c +++ b/glfw/wl_window.c @@ -809,7 +809,6 @@ apply_xdg_configure_changes(_GLFWwindow *window) { window->wl.current.toplevel_states = new_states; window->wl.current.width = width; window->wl.current.height = height; - _glfwInputWindowFocus(window, window->wl.current.toplevel_states & TOPLEVEL_STATE_ACTIVATED); if (live_resize_done) report_live_resize(window, false); } }