adrienverge / gnome-magic-window

Bind a key to a specific program in Gnome Shell.
GNU General Public License v3.0
31 stars 8 forks source link

Cope with get_wm_class() returning null #3

Open mikecrowe opened 3 years ago

mikecrowe commented 3 years ago

get_wm_class() returns null for me for Chromium's pop out video windows (as used by BBC iPlayer.) This stops gnome-magic-window from working at all:

bad output from Gnome looking glass: (false, 'TypeError: w.get_meta_window().get_wm_class() is null')

Fix this by checking explicitly for null.

adrienverge commented 3 years ago

Thanks for your contribution!

The project needed to be turned into a Gnome extension, otherwise it does not work anymore with Gnome 41. Could you update the PR to apply your code in extension.js? And test that it still works?

mikecrowe commented 3 years ago

I probably can, but I don't run Gnome 41 anywhere yet so it might take me a while.

adrienverge commented 3 years ago

Sure, I understand.

But for info I just tested on an older Gnome (version 40) and it works too, so I just pushed commit 531d129. Feel free to try the same!