[gnome-shell] workspace: Use new helper function when accepting drops



commit 88244222fdc1b5b2aec3a23a09678a7eaad35cf2
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Mar 31 17:13:33 2022 +0200

    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>

 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 60e0d44a84..0e22af59b6 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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]