workspaceThumbnail: Use new helper function when accepting drops
Moving a window from a secondary monitor to a non-active workspace currently fails for the aforementioned reasons. Use the newly added helper function to address this. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/893 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2259>
This commit is contained in:
parent
88244222fd
commit
ff29159df2
@ -552,14 +552,8 @@ var WorkspaceThumbnail = GObject.registerClass({
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
let metaWindow = win.get_meta_window();
|
let metaWindow = win.get_meta_window();
|
||||||
|
Main.moveWindowToMonitorAndWorkspace(metaWindow,
|
||||||
// We need to move the window before changing the workspace, because
|
this.monitorIndex, this.metaWorkspace.index());
|
||||||
// the move itself could cause a workspace change if the window enters
|
|
||||||
// the primary monitor
|
|
||||||
if (metaWindow.get_monitor() != this.monitorIndex)
|
|
||||||
metaWindow.move_to_monitor(this.monitorIndex);
|
|
||||||
|
|
||||||
metaWindow.change_workspace_by_index(this.metaWorkspace.index(), false);
|
|
||||||
return true;
|
return true;
|
||||||
} else if (source.app && source.app.can_open_new_window()) {
|
} else if (source.app && source.app.can_open_new_window()) {
|
||||||
if (source.animateLaunchAtPos)
|
if (source.animateLaunchAtPos)
|
||||||
@ -903,9 +897,8 @@ var ThumbnailsBox = GObject.registerClass({
|
|||||||
if (isWindow) {
|
if (isWindow) {
|
||||||
// Move the window to our monitor first if necessary.
|
// Move the window to our monitor first if necessary.
|
||||||
let thumbMonitor = this._thumbnails[newWorkspaceIndex].monitorIndex;
|
let thumbMonitor = this._thumbnails[newWorkspaceIndex].monitorIndex;
|
||||||
if (source.metaWindow.get_monitor() != thumbMonitor)
|
Main.moveWindowToMonitorAndWorkspace(source.metaWindow,
|
||||||
source.metaWindow.move_to_monitor(thumbMonitor);
|
thumbMonitor, newWorkspaceIndex, true);
|
||||||
source.metaWindow.change_workspace_by_index(newWorkspaceIndex, true);
|
|
||||||
} else if (source.app && source.app.can_open_new_window()) {
|
} else if (source.app && source.app.can_open_new_window()) {
|
||||||
if (source.animateLaunchAtPos)
|
if (source.animateLaunchAtPos)
|
||||||
source.animateLaunchAtPos(actor.x, actor.y);
|
source.animateLaunchAtPos(actor.x, actor.y);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user