window-list: Fix icons not showing for some windows on wayland

On wayland, the properties that are used for application matching
are generally set after the window has been created, so it is
normal that buttons start with the fallback icon. While we already
track the properties that are relevant for app matching, our signal
handler may run before the window is matched to its app.

Make sure the WindowTracker gets to process those signals first by
using connect_after() for our own handlers.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/10.
This commit is contained in:
Florian Müllner
2017-12-25 10:21:18 +01:00
parent 9dc183af23
commit 22e416c09b
+4 -4
View File
@@ -156,11 +156,11 @@ class WindowTitle {
this._textureCache.connect('icon-theme-changed',
this._updateIcon.bind(this));
this._notifyWmClass =
this._metaWindow.connect('notify::wm-class',
this._updateIcon.bind(this));
this._metaWindow.connect_after('notify::wm-class',
this._updateIcon.bind(this));
this._notifyAppId =
this._metaWindow.connect('notify::gtk-application-id',
this._updateIcon.bind(this));
this._metaWindow.connect_after('notify::gtk-application-id',
this._updateIcon.bind(this));
this._updateIcon();
this.actor.connect('destroy', this._onDestroy.bind(this));