]> git.mdlowis.com Git - proto/labwc.git/commitdiff
src/workspaces.c: allow dragged views to be moved to other workspaces
authorSumandora <johannesmiesenhardt@gmail.com>
Fri, 27 Jun 2025 11:30:30 +0000 (13:30 +0200)
committerGitHub <noreply@github.com>
Fri, 27 Jun 2025 11:30:30 +0000 (13:30 +0200)
src/workspaces.c

index 2ce1f3768be566a5e359b39c80ea56a8689fa110..45b2f9189c45e428eabb40ffe5fd676631049a18 100644 (file)
@@ -443,6 +443,11 @@ workspaces_switch_to(struct workspace *target, bool update_focus)
        /* Make sure new views will spawn on the new workspace */
        server->workspaces.current = target;
 
+       struct view *grabbed_view = server->grabbed_view;
+       if (grabbed_view && !view_is_always_on_top(grabbed_view)) {
+               view_move_to_workspace(grabbed_view, target);
+       }
+
        /*
         * Make sure we are focusing what the user sees. Only refocus if
         * the focus is not already on an omnipresent or always-on-top view.