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)