Fix regression after mutter commit 254afc50223a707c3afa7c9f638681199f41809e
The "old and unused API" was not so unused after all :)
This commit is contained in:
parent
638aee65c0
commit
61a58ff3c9
@ -804,22 +804,25 @@ const ThumbnailsBox = new Lang.Class({
|
|||||||
[newWorkspaceIndex, this._dropPlaceholderPos] = [this._dropPlaceholderPos, -1];
|
[newWorkspaceIndex, this._dropPlaceholderPos] = [this._dropPlaceholderPos, -1];
|
||||||
|
|
||||||
// Nab all the windows below us.
|
// Nab all the windows below us.
|
||||||
let windows = global.get_window_actors().filter(function(win) {
|
let windows = global.get_window_actors().filter(function(winActor) {
|
||||||
// If the window is attached to an ancestor, we don't need/want to move it
|
// If the window is attached to an ancestor, we don't need/want to move it
|
||||||
if (!!win.meta_window.get_transient_for())
|
let window = winActor.meta_window;
|
||||||
|
|
||||||
|
if (window.get_transient_for() != null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (isWindow)
|
if (isWindow)
|
||||||
return win.get_workspace() >= newWorkspaceIndex && win != source;
|
return window.get_workspace() >= newWorkspaceIndex && winActor != source;
|
||||||
else
|
else
|
||||||
return win.get_workspace() >= newWorkspaceIndex;
|
return window.get_workspace() >= newWorkspaceIndex;
|
||||||
});
|
});
|
||||||
|
|
||||||
this._spliceIndex = newWorkspaceIndex;
|
this._spliceIndex = newWorkspaceIndex;
|
||||||
|
|
||||||
// ... move them down one.
|
// ... move them down one.
|
||||||
windows.forEach(function(win) {
|
windows.forEach(function(winActor) {
|
||||||
win.meta_window.change_workspace_by_index(win.get_workspace() + 1, true);
|
let window = winActor.meta_window;
|
||||||
|
window.change_workspace_by_index(window.get_workspace() + 1, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isWindow)
|
if (isWindow)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user