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))
|
||||
return false;
|
||||
|
||||
// We need to move the window before changing the workspace, because
|
||||
// the move itself could cause a workspace change if the window enters
|
||||
// the primary monitor
|
||||
if (window.get_monitor() != this.monitorIndex)
|
||||
window.move_to_monitor(this.monitorIndex);
|
||||
|
||||
window.change_workspace_by_index(workspaceIndex, false);
|
||||
Main.moveWindowToMonitorAndWorkspace(window,
|
||||
this.monitorIndex, workspaceIndex);
|
||||
return true;
|
||||
} else if (source.app && source.app.can_open_new_window()) {
|
||||
if (source.animateLaunchAtPos)
|
||||
|
Loading…
Reference in New Issue
Block a user