mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-09-01 12:23:48 -07:00
internal: Ensure unique identifiers for persistent workspaces (#11409)
This commit is contained in:
@@ -1727,6 +1727,14 @@ WORKSPACEID CCompositor::getNextAvailableNamedWorkspace() {
|
||||
lowest = w->m_id;
|
||||
}
|
||||
|
||||
// Give priority to persistent workspaces to avoid any conflicts between them.
|
||||
for (auto const& rule : g_pConfigManager->getAllWorkspaceRules()) {
|
||||
if (!rule.isPersistent)
|
||||
continue;
|
||||
if (rule.workspaceId < -1 && rule.workspaceId < lowest)
|
||||
lowest = rule.workspaceId;
|
||||
}
|
||||
|
||||
return lowest - 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user