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
This commit is contained in:
Nick Evans 2023-08-15 10:56:09 +01:00
parent 1bd51f9a38
commit 9af6c6ddc5

View file

@ -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) {