mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-05 06:31:57 -07:00
core: match all workspace rules instead of the first one only (#5340)
This commit is contained in:
@@ -1260,8 +1260,13 @@ void CCompositor::sanityCheckWorkspaces() {
|
||||
auto it = m_vWorkspaces.begin();
|
||||
while (it != m_vWorkspaces.end()) {
|
||||
|
||||
const auto WORKSPACERULE = g_pConfigManager->getWorkspaceRuleFor(it->get());
|
||||
if (WORKSPACERULE.isPersistent) {
|
||||
const auto WORKSPACERULES = g_pConfigManager->getWorkspaceRulesFor(it->get());
|
||||
bool isPersistent = false;
|
||||
for (auto& wsRule : WORKSPACERULES) {
|
||||
if (wsRule.isPersistent)
|
||||
isPersistent = true;
|
||||
}
|
||||
if (isPersistent) {
|
||||
++it;
|
||||
continue;
|
||||
}
|
||||
@@ -1288,8 +1293,10 @@ void CCompositor::sanityCheckWorkspaces() {
|
||||
continue;
|
||||
}
|
||||
if (!WORKSPACE->m_bOnCreatedEmptyExecuted) {
|
||||
if (auto cmd = WORKSPACERULE.onCreatedEmptyRunCmd)
|
||||
g_pKeybindManager->spawn(*cmd);
|
||||
for (auto& wsRule : WORKSPACERULES) {
|
||||
if (auto cmd = wsRule.onCreatedEmptyRunCmd)
|
||||
g_pKeybindManager->spawn(*cmd);
|
||||
}
|
||||
|
||||
WORKSPACE->m_bOnCreatedEmptyExecuted = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user