]> git.mdlowis.com Git - proto/labwc.git/commitdiff
workspaces: use view_for_each_reverse() to move omnipresent views
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Tue, 12 Nov 2024 19:35:00 +0000 (20:35 +0100)
committerJohan Malm <johanmalm@users.noreply.github.com>
Mon, 25 Nov 2024 19:21:43 +0000 (19:21 +0000)
This ensures that the view ordering and focus behavior of
omnipresent views is the same when switching workspaces.

src/workspaces.c

index 190549e6894f42161eeb7e488ff4f828ef5a6554..93bd0db67ce120646067ef80cd2dea141448b324 100644 (file)
@@ -323,7 +323,7 @@ workspaces_switch_to(struct workspace *target, bool update_focus)
        struct view *view;
        enum lab_view_criteria criteria =
                LAB_VIEW_CRITERIA_CURRENT_WORKSPACE;
-       for_each_view(view, &server->views, criteria) {
+       for_each_view_reverse(view, &server->views, criteria) {
                if (view->visible_on_all_workspaces) {
                        view_move_to_workspace(view, target);
                }