From 4af36f41fa25d41caf7a4e7d23313eb82950949f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 7 Oct 2014 15:11:24 +0200 Subject: [PATCH] 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 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js index 9531e26e..934f9c11 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); }