[gnome-shell-extensions] window-list: Don't use Meta.get_window_actors() directly



commit 4af36f41fa25d41caf7a4e7d23313eb82950949f
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Oct 7 15:11:24 2014 +0200

    window-list: Don't use Meta.get_window_actors() directly
    
    The list returned may contain windows that are being destroyed.
    The ShellGlobal method filters those out, so use that instead; we
    should eventually stop looking at window actors when we want windows,
    but for now this is the easy and safe thing to do.

 extensions/window-list/extension.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
index 9531e26..934f9c1 100644
--- a/extensions/window-list/extension.js
+++ b/extensions/window-list/extension.js
@@ -908,7 +908,7 @@ const WindowList = new Lang.Class({
         this._windowList.destroy_all_children();
 
         if (!this._grouped) {
-            let windows = Meta.get_window_actors(global.screen).sort(
+            let windows = global.get_window_actors().sort(
                 function(w1, w2) {
                     return w1.metaWindow.get_stable_sequence() -
                            w2.metaWindow.get_stable_sequence();
@@ -1127,7 +1127,7 @@ const WindowList = new Lang.Class({
 
         this._settings.disconnect(this._groupingModeChangedId);
 
-        let windows = Meta.get_window_actors(global.screen);
+        let windows = global.get_window_actors();
         for (let i = 0; i < windows.length; i++)
             windows[i].metaWindow.set_icon_geometry(null);
     }


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