workspace: 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
1cb01ec5b1
commit
88244222fd
@ -1467,13 +1467,8 @@ class Workspace extends St.Widget {
|
|||||||
if (this._isMyWindow(window))
|
if (this._isMyWindow(window))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// We need to move the window before changing the workspace, because
|
Main.moveWindowToMonitorAndWorkspace(window,
|
||||||
// the move itself could cause a workspace change if the window enters
|
this.monitorIndex, workspaceIndex);
|
||||||
// the primary monitor
|
|
||||||
if (window.get_monitor() != this.monitorIndex)
|
|
||||||
window.move_to_monitor(this.monitorIndex);
|
|
||||||
|
|
||||||
window.change_workspace_by_index(workspaceIndex, 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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user