workspace: Adapt to mutter API changes
This commit is contained in:
parent
02f2f694e4
commit
37c8132632
@ -1621,9 +1621,7 @@ const Workspace = new Lang.Class({
|
|||||||
metaWindow.move_to_monitor(this.monitorIndex);
|
metaWindow.move_to_monitor(this.monitorIndex);
|
||||||
|
|
||||||
let index = this.metaWorkspace ? this.metaWorkspace.index() : global.screen.get_active_workspace_index();
|
let index = this.metaWorkspace ? this.metaWorkspace.index() : global.screen.get_active_workspace_index();
|
||||||
metaWindow.change_workspace_by_index(index,
|
metaWindow.change_workspace_by_index(index, false);
|
||||||
false, // don't create workspace
|
|
||||||
time);
|
|
||||||
return true;
|
return true;
|
||||||
} else if (source.shellWorkspaceLaunch) {
|
} else if (source.shellWorkspaceLaunch) {
|
||||||
source.shellWorkspaceLaunch({ workspace: this.metaWorkspace ? this.metaWorkspace.index() : -1,
|
source.shellWorkspaceLaunch({ workspace: this.metaWorkspace ? this.metaWorkspace.index() : -1,
|
||||||
|
@ -507,9 +507,7 @@ const WorkspaceThumbnail = new Lang.Class({
|
|||||||
if (metaWindow.get_monitor() != this.monitorIndex)
|
if (metaWindow.get_monitor() != this.monitorIndex)
|
||||||
metaWindow.move_to_monitor(this.monitorIndex);
|
metaWindow.move_to_monitor(this.monitorIndex);
|
||||||
|
|
||||||
metaWindow.change_workspace_by_index(this.metaWorkspace.index(),
|
metaWindow.change_workspace_by_index(this.metaWorkspace.index(), false);
|
||||||
false, // don't create workspace
|
|
||||||
time);
|
|
||||||
return true;
|
return true;
|
||||||
} else if (source.shellWorkspaceLaunch) {
|
} else if (source.shellWorkspaceLaunch) {
|
||||||
source.shellWorkspaceLaunch({ workspace: this.metaWorkspace ? this.metaWorkspace.index() : -1,
|
source.shellWorkspaceLaunch({ workspace: this.metaWorkspace ? this.metaWorkspace.index() : -1,
|
||||||
@ -739,14 +737,12 @@ const ThumbnailsBox = new Lang.Class({
|
|||||||
|
|
||||||
// ... move them down one.
|
// ... move them down one.
|
||||||
windows.forEach(function(win) {
|
windows.forEach(function(win) {
|
||||||
win.meta_window.change_workspace_by_index(win.get_workspace() + 1,
|
win.meta_window.change_workspace_by_index(win.get_workspace() + 1, true);
|
||||||
true, time);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isWindow)
|
if (isWindow)
|
||||||
// ... and bam, a workspace, good as new.
|
// ... and bam, a workspace, good as new.
|
||||||
source.metaWindow.change_workspace_by_index(newWorkspaceIndex,
|
source.metaWindow.change_workspace_by_index(newWorkspaceIndex, true);
|
||||||
true, time);
|
|
||||||
else if (source.shellWorkspaceLaunch) {
|
else if (source.shellWorkspaceLaunch) {
|
||||||
source.shellWorkspaceLaunch({ workspace: newWorkspaceIndex,
|
source.shellWorkspaceLaunch({ workspace: newWorkspaceIndex,
|
||||||
timestamp: time });
|
timestamp: time });
|
||||||
|
Loading…
Reference in New Issue
Block a user