From 9af6c6ddc5fec2087df389cbe613ab08ae2ee219 Mon Sep 17 00:00:00 2001 From: Nick Evans Date: Tue, 15 Aug 2023 10:56:09 +0100 Subject: [PATCH] windowManager: Reset the key focus when moving between workspaces In the overview, the key focus should not remain on a window in an inactive workspace. Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5345 --- js/ui/windowManager.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index dd67b8ea3..9173ae84c 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -1845,8 +1845,10 @@ export class WindowManager { if (!Main.sessionMode.hasWorkspaces) return; - if (!workspace.active) + if (!workspace.active) { workspace.activate(global.get_current_time()); + global.stage.set_key_focus(null); + } } actionMoveWindow(window, workspace) {