workspaces: use view_for_each_reverse() to move omnipresent views

This ensures that the view ordering and focus behavior of
omnipresent views is the same when switching workspaces.
This commit is contained in:
Consolatis 2024-11-12 20:35:00 +01:00 committed by Johan Malm
parent e274c588c0
commit 763ba6209e

View 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);
}