mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 22:45:58 +01:00
attempt to fix a specialworkspace crash
This commit is contained in:
parent
beef23cee5
commit
9742ac7596
1 changed files with 7 additions and 2 deletions
|
@ -890,11 +890,16 @@ void CKeybindManager::toggleSpecialWorkspace(std::string args) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
auto PSPECIALWORKSPACE = g_pCompositor->getWorkspaceByID(SPECIAL_WORKSPACE_ID);
|
||||||
|
|
||||||
|
if (!PSPECIALWORKSPACE) {
|
||||||
|
// ??? happens sometimes...?
|
||||||
|
PSPECIALWORKSPACE = g_pCompositor->m_vWorkspaces.emplace_back(std::make_unique<CWorkspace>(g_pCompositor->m_pLastMonitor->ID, "special", true)).get();
|
||||||
|
}
|
||||||
|
|
||||||
g_pCompositor->m_pLastMonitor->specialWorkspaceOpen = true;
|
g_pCompositor->m_pLastMonitor->specialWorkspaceOpen = true;
|
||||||
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(g_pCompositor->m_pLastMonitor->ID);
|
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(g_pCompositor->m_pLastMonitor->ID);
|
||||||
|
|
||||||
const auto PSPECIALWORKSPACE = g_pCompositor->getWorkspaceByID(SPECIAL_WORKSPACE_ID);
|
|
||||||
|
|
||||||
PSPECIALWORKSPACE->startAnim(true, true);
|
PSPECIALWORKSPACE->startAnim(true, true);
|
||||||
PSPECIALWORKSPACE->m_iMonitorID = g_pCompositor->m_pLastMonitor->ID;
|
PSPECIALWORKSPACE->m_iMonitorID = g_pCompositor->m_pLastMonitor->ID;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue