From 5ba0c6404b93e835d6700938fbe089fe6413c4a8 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Mon, 14 Jan 2013 12:43:24 -0500 Subject: [PATCH] main: Move getWindowActorsForWorkspace to layout It's only used here. https://bugzilla.gnome.org/show_bug.cgi?id=691746 --- js/ui/layout.js | 9 ++++++++- js/ui/main.js | 8 -------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/js/ui/layout.js b/js/ui/layout.js index f308c4446..6ce509cd1 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -671,8 +671,15 @@ const LayoutManager = new Lang.Class({ this._queueUpdateRegions(); }, + _getWindowActorsForWorkspace: function(workspace) { + return global.get_window_actors().filter(function (actor) { + let win = actor.meta_window; + return win.located_on_workspace(workspace); + }); + }, + _updateFullscreen: function() { - let windows = Main.getWindowActorsForWorkspace(global.screen.get_active_workspace_index()); + let windows = this._getWindowActorsForWorkspace(global.screen.get_active_workspace()); // Reset all monitors to not fullscreen for (let i = 0; i < this.monitors.length; i++) diff --git a/js/ui/main.js b/js/ui/main.js index e97759506..6fc49f13e 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -472,14 +472,6 @@ function notifyError(msg, details) { notify(msg, details); } -function getWindowActorsForWorkspace(workspaceIndex) { - let workspace = global.screen.get_workspace_by_index(workspaceIndex); - return global.get_window_actors().filter(function (actor) { - let win = actor.meta_window; - return win.located_on_workspace(workspace); - }); -} - function _findModal(actor) { for (let i = 0; i < modalActorFocusStack.length; i++) { if (modalActorFocusStack[i].actor == actor)