-
-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
window_switcher plugin throws ValueError if there is Google Chrome Picture-in-Picture window open #967
Labels
Stale
Stale issue, closing soon.
Comments
Please mention the author of the extension |
@dshoreman FYI |
Thanks for the ping; if someone doesn't beat me to it I'll take a look at
this after new year's some time.
…On Wed, 30 Dec 2020 at 07:53, andreiple ***@***.***> wrote:
@dshoreman <https://github.com/dshoreman> FYI
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#967 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALTRCTF5CFHOLBFMJJEEJLSXLL7BANCNFSM4VM2NBCQ>
.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
saierd
added a commit
to saierd/albert-python
that referenced
this issue
Apr 5, 2021
Closes albertlauncher/albert#967. Usually the WM_CLASS printed by wmctrl has two parts (instance and class name), separated by a dot. There are cases where this is not true: * Chrome's picture-in-picture window shows a WM_CLASS of N/A (see albertlauncher/albert#967). * Nautilus / Gnome Files on Ubuntu 20.04 shows a WM_CLASS value of 'org.gnome.Nautilus.Org.gnome.Nautilus', indicating the instance name 'org.gnome.Nautilus' with the class 'Org.gnome.Nautilus'. Both cases previously lead to a ValueError due to the unexpected number of parts after the split. We now handle the second case by splitting the list of dot-separated parts in the middle, assuming both pieces have the same number of parts. As a fallback, we use the whole WM_CLASS as the instance name, which should also cover the case of the Chrome window.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Source
Additional info
Albert report output
Ubuntu 20.04.1 LTS \n \l 5.4.0-58-generic GNOME_DESKTOP_SESSION_ID=this-is-deprecated DESKTOP_SESSION=ubuntu XDG_SESSION_DESKTOP=ubuntu XDG_SESSION_TYPE=x11 XDG_CURRENT_DESKTOP=ubuntu:GNOME GIO_LAUNCHED_DESKTOP_FILE_PID=3101706 qmake-qt5: command not found albert 0.17.2QtDiag output
Command 'qdiag' not foundTerminal output (stdout and stderr)
18:26:17 [warn:python.modulev1] [window_switcher] ValueError: not enough values to unpack (expected 2, got 1)At:
/usr/share/albert/org.albert.extension.python/modules/window_switcher/init.py(28): handleQuery
.
18:26:17 [warn:python.modulev1] [window_switcher] ValueError: not enough values to unpack (expected 2, got 1)
At:
/usr/share/albert/org.albert.extension.python/modules/window_switcher/init.py(28): handleQuery
.
18:26:17 [warn:python.modulev1] [window_switcher] ValueError: not enough values to unpack (expected 2, got 1)
At:
/usr/share/albert/org.albert.extension.python/modules/window_switcher/init.py(28): handleQuery
.
18:26:17 [warn:python.modulev1] [window_switcher] ValueError: not enough values to unpack (expected 2, got 1)
At:
/usr/share/albert/org.albert.extension.python/modules/window_switcher/init.py(28): handleQuery
.
18:26:18 [warn:python.modulev1] [window_switcher] ValueError: not enough values to unpack (expected 2, got 1)
At:
/usr/share/albert/org.albert.extension.python/modules/window_switcher/init.py(28): handleQuery
.
18:26:18 [warn:python.modulev1] [window_switcher] ValueError: not enough values to unpack (expected 2, got 1)
At:
/usr/share/albert/org.albert.extension.python/modules/window_switcher/init.py(28): handleQuery
.
Steps to reproduce
Expected behaviour
Search results should return open Google Chrome window(s)
Actual behaviour
Albert doesn't return a list of matching open windows, but rather throws ValueError in the logs, see attached Terminal output above. Probably that happens due to "N/A" window class returned by wmctrl, e.g.
0x03600007 1 google-chrome.Google-chrome andrei-vm YouTube - Google Chrome
0x03000007 0 tilix.Tilix andrei-vm 1: ~
0x03600325 1 N/A andrei-vm Picture-in-picture
The text was updated successfully, but these errors were encountered: