[gnome-shell-extensions/wip/wang/work-around-missing-icons] window-list: App icon not shown on the taskbar



commit f682870110e782117f38e55d54ce2afa36cc91c4
Author: Xiaoguang Wang <xwang suse com>
Date:   Sat Nov 4 15:16:29 2017 +0800

    window-list: App icon not shown on the taskbar
    
    Some application can't show icon when working in wayland.
    Use application state change signal to update app icon.
    
    Fixes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/10

 extensions/window-list/extension.js | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
index f01b872..6d341ce 100644
--- a/extensions/window-list/extension.js
+++ b/extensions/window-list/extension.js
@@ -167,6 +167,11 @@ const WindowTitle = new Lang.Class({
         this._notifyAppId =
             this._metaWindow.connect('notify::gtk-application-id',
                                      Lang.bind(this, this._updateIcon));
+
+        let appSys = Shell.AppSystem.get_default();
+        this._appStateChangedSignalId =
+            appSys.connect('app-state-changed', Lang.bind(this, this._updateIcon));
+
         this._updateIcon();
 
         this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
@@ -210,6 +215,9 @@ const WindowTitle = new Lang.Class({
         this._metaWindow.disconnect(this._notifyMinimizedId);
         this._metaWindow.disconnect(this._notifyWmClass);
         this._metaWindow.disconnect(this._notifyAppId);
+
+        let appSys = Shell.AppSystem.get_default();
+        appSys.disconnect(this._appStateChangedSignalId);
     }
 });
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]