From c4177ce877efa1f4a177b725905e049edc8e071d Mon Sep 17 00:00:00 2001 From: llyyr Date: Fri, 21 Aug 2026 23:13:16 +0530 Subject: [PATCH] ext/workspaces: sort buttons when workspace changes group handle_workspace_enter/leave never called set_needs_sorting. As a result, moving a workspace to a different output's group appended new buttons to the end of the box instead of placing them in sorted order. --- src/modules/ext/workspace_manager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/ext/workspace_manager.cpp b/src/modules/ext/workspace_manager.cpp index b4471c14b1..cfb4d88983 100644 --- a/src/modules/ext/workspace_manager.cpp +++ b/src/modules/ext/workspace_manager.cpp @@ -301,6 +301,7 @@ void WorkspaceGroup::handle_output_leave(wl_output* output) { void WorkspaceGroup::handle_workspace_enter(ext_workspace_handle_v1* handle) { workspaces_.push_back(handle); + workspaces_manager_.set_needs_sorting(); } void WorkspaceGroup::handle_workspace_leave(ext_workspace_handle_v1* handle) { @@ -308,6 +309,7 @@ void WorkspaceGroup::handle_workspace_leave(ext_workspace_handle_v1* handle) { if (it != workspaces_.end()) { workspaces_.erase(it); } + workspaces_manager_.set_needs_sorting(); } void WorkspaceGroup::handle_removed() {