From 9fb02a76ebdd6a3a5a8e93cfe9bc2c91d11ae912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Santos?= Date: Tue, 14 Oct 2025 12:35:31 +0100 Subject: [PATCH] fix(hyprexpo): correct workspace wrap logic in center picker for named workspaces Ensure the center workspace picker correctly wraps and displays contiguous workspaces when using named or negative workspace IDs. The previous condition if (i > 0 && currentID <= firstID) prevented wrapping, so when the selected workspace was at the high end users saw empty slots after the center instead of the next active workspaces. Replace the condition with if (i > 0 && currentID == firstID) so the picker continues filling the visible slots with the next available workspaces and preserves screen real estate. Behavioral notes - Named workspaces that use negative IDs (for example -1337 and below) no longer break the picker layout. - The picker now shows as many contiguous active workspaces as possible around the selected workspace instead of leaving trailing empty cards. - The change is local to the center picker loop logic and preserves existing ordering and selection rules. --- hyprexpo/overview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyprexpo/overview.cpp b/hyprexpo/overview.cpp index 9d84387..e9df043 100644 --- a/hyprexpo/overview.cpp +++ b/hyprexpo/overview.cpp @@ -91,7 +91,7 @@ COverview::COverview(PHLWORKSPACE startedOn_, bool swipe_) : startedOn(startedOn currentID = getWorkspaceIDNameFromString(selector + std::to_string((int64_t)i - backtracked)).id; } else { currentID = getWorkspaceIDNameFromString(selector + "+" + std::to_string((int64_t)i - backtracked)).id; - if (i > 0 && currentID <= firstID) + if (i > 0 && currentID == firstID) break; } image.workspaceID = currentID;