mirror of
https://github.com/hyprwm/hyprland-plugins.git
synced 2025-10-29 11:48:42 +00:00
hyprexpo: correct workspace wrap logic in center picker for named workspaces (#509)
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.
This commit is contained in:
parent
25a5d1327e
commit
bff3b23ad1
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user