chrome: try find fullscreen windows only on current workspace
https://bugzilla.gnome.org/show_bug.cgi?id=641677
This commit is contained in:
parent
95e6eae23b
commit
2792ad1cf4
@ -233,7 +233,7 @@ Chrome.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_windowsRestacked: function() {
|
_windowsRestacked: function() {
|
||||||
let windows = global.get_window_actors();
|
let windows = Main.getWindowActorsForWorkspace(global.screen.get_active_workspace_index());
|
||||||
let primary = global.get_primary_monitor();
|
let primary = global.get_primary_monitor();
|
||||||
|
|
||||||
// The chrome layer should be visible unless there is a window
|
// The chrome layer should be visible unless there is a window
|
||||||
|
@ -303,6 +303,17 @@ function _relayout() {
|
|||||||
overview.hide();
|
overview.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isWindowActorDisplayedOnWorkspace(win, workspaceIndex) {
|
||||||
|
return win.get_workspace() == workspaceIndex ||
|
||||||
|
(win.get_meta_window() && win.get_meta_window().is_on_all_workspaces());
|
||||||
|
}
|
||||||
|
|
||||||
|
function getWindowActorsForWorkspace(workspaceIndex) {
|
||||||
|
return global.get_window_actors().filter(function (win) {
|
||||||
|
return isWindowActorDisplayedOnWorkspace(win, workspaceIndex);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// metacity-clutter currently uses the same prefs as plain metacity,
|
// metacity-clutter currently uses the same prefs as plain metacity,
|
||||||
// which probably means we'll be starting out with multiple workspaces;
|
// which probably means we'll be starting out with multiple workspaces;
|
||||||
// remove any unused ones. (We do this from an idle handler, because
|
// remove any unused ones. (We do this from an idle handler, because
|
||||||
|
@ -552,7 +552,7 @@ Workspace.prototype = {
|
|||||||
this.actor.height = global.screen_height;
|
this.actor.height = global.screen_height;
|
||||||
this.scale = 1.0;
|
this.scale = 1.0;
|
||||||
|
|
||||||
let windows = global.get_window_actors().filter(this._isMyWindow, this);
|
let windows = Main.getWindowActorsForWorkspace(this.metaWorkspace.index());
|
||||||
|
|
||||||
// Create clones for remaining windows that should be
|
// Create clones for remaining windows that should be
|
||||||
// visible in the Overview
|
// visible in the Overview
|
||||||
@ -1308,8 +1308,7 @@ Workspace.prototype = {
|
|||||||
|
|
||||||
// Tests if @win belongs to this workspaces
|
// Tests if @win belongs to this workspaces
|
||||||
_isMyWindow : function (win) {
|
_isMyWindow : function (win) {
|
||||||
return win.get_workspace() == this.metaWorkspace.index() ||
|
return Main.isWindowActorDisplayedOnWorkspace(win, this.metaWorkspace.index());
|
||||||
(win.get_meta_window() && win.get_meta_window().is_on_all_workspaces());
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Tests if @win should be shown in the Overview
|
// Tests if @win should be shown in the Overview
|
||||||
|
Loading…
Reference in New Issue
Block a user