From 88244222fdc1b5b2aec3a23a09678a7eaad35cf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 31 Mar 2022 17:13:33 +0200 Subject: [PATCH] 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: --- js/ui/workspace.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/js/ui/workspace.js b/js/ui/workspace.js index 60e0d44a8..0e22af59b 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -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)