internal: Ensure unique identifiers for persistent workspaces (#11409)
This commit is contained in:
parent
2b6e2ceb2e
commit
aa6a78f0a4
2 changed files with 11 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue