workspaces: Add binds:hide_special_on_workspace_change (#9728)

This commit is contained in:
LeviVanDerMaas
2025-03-30 03:11:39 +02:00
committed by GitHub
parent fc7223edc0
commit 05eb0aa43d
4 changed files with 23 additions and 4 deletions

View File

@@ -2117,6 +2117,8 @@ PHLMONITOR CCompositor::getMonitorFromString(const std::string& name) {
}
void CCompositor::moveWorkspaceToMonitor(PHLWORKSPACE pWorkspace, PHLMONITOR pMonitor, bool noWarpCursor) {
static auto PHIDESPECIALONWORKSPACECHANGE = CConfigValue<Hyprlang::INT>("binds:hide_special_on_workspace_change");
if (!pWorkspace || !pMonitor)
return;
@@ -2199,6 +2201,9 @@ void CCompositor::moveWorkspaceToMonitor(PHLWORKSPACE pWorkspace, PHLMONITOR pMo
pMonitor->activeWorkspace->startAnim(false, false);
}
if (*PHIDESPECIALONWORKSPACECHANGE)
pMonitor->setSpecialWorkspace(nullptr);
setActiveMonitor(pMonitor);
pMonitor->activeWorkspace = pWorkspace;
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(pMonitor->ID);