shell icon indicating copy to clipboard operation
shell copied to clipboard

Window focus switching buggy due to `@!0,!0;BDHF` window

Open hoodmane opened this issue 1 year ago • 1 comments

Issue/Bug Description

Super + focus sometimes doesn't correctly move focus. Instead the focus lands on a window called @!<###>,!<###>;BDHF. It seems to happen most often when focus should change monitors. I fixed it with the following patch:

diff --git a/src/focus.ts b/src/focus.ts
index 91ede48..0433f1a 100644
--- a/src/focus.ts
+++ b/src/focus.ts
@@ -51,7 +51,7 @@ function select(
     focused: ShellWindow,
     window_list: Array<ShellWindow>
 ): ShellWindow | null {
-    const array = windows(focused, window_list);
+    const array = windows(focused, window_list).filter(win => !win.meta.get_title()?.endsWith(";BDHF"));
     return array.length > 0 ? array[0] : null;
 }

Steps to reproduce (if you know)

Not sure.

Expected behavior:

Select the next window over.

Distribution:

$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

Gnome Shell version

$ gnome-shell --version
GNOME Shell 42.9

Pop Shell version

commit 8e176f14029a2c3bb54c52e1e7a5c697b9eb2171 (HEAD -> master_jammy

hoodmane avatar Feb 03 '24 21:02 hoodmane

Big thanks for the sharing the temporary fix! I experienced the same bug and the fix worked. Using Ubuntu 23.10 Mantic Minotaur with Gnome Shell 45.2 and Pop Shell commit 9a30c5b in master-mantic branch.

maubuz avatar Feb 28 '24 16:02 maubuz