[gnome-shell-extensions] window-list: Update icon on app changes



commit f99b42e73232f794b00e8487fcd595661ebd4fba
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Sep 20 17:56:19 2016 +0200

    window-list: Update icon on app changes
    
    We currently assume that the application associated with a particular
    window is fixed. While this holds true for almost every application,
    there are some cases of multi-app-packages like LibreOffice where
    windows may change the properties used for application matching at
    runtime. Catch those cases to make sure we display the correct icon
    when the window shifts applications.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=771731

 extensions/window-list/extension.js |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
index bdd4680..15db297 100644
--- a/extensions/window-list/extension.js
+++ b/extensions/window-list/extension.js
@@ -152,6 +152,12 @@ const WindowTitle = new Lang.Class({
         this._iconThemeChangedId =
             this._textureCache.connect('icon-theme-changed',
                                        Lang.bind(this, this._updateIcon));
+        this._notifyWmClass =
+            this._metaWindow.connect('notify::wm-class',
+                                     Lang.bind(this, this._updateIcon));
+        this._notifyAppId =
+            this._metaWindow.connect('notify::gtk-application-id',
+                                     Lang.bind(this, this._updateIcon));
         this._updateIcon();
 
         this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
@@ -193,6 +199,8 @@ const WindowTitle = new Lang.Class({
         this._textureCache.disconnect(this._iconThemeChangedId);
         this._metaWindow.disconnect(this._notifyTitleId);
         this._metaWindow.disconnect(this._notifyMinimizedId);
+        this._metaWindow.disconnect(this._notifyWmClass);
+        this._metaWindow.disconnect(this._notifyAppId);
     }
 });
 


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