main: Move getWindowActorsForWorkspace to layout

It's only used here.

https://bugzilla.gnome.org/show_bug.cgi?id=691746
This commit is contained in:
Jasper St. Pierre 2013-01-14 12:43:24 -05:00
parent f738c2be9d
commit 5ba0c6404b
2 changed files with 8 additions and 9 deletions

View File

@ -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++)

View File

@ -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)