3
0
mirror of https://github.com/hyprwm/Hyprland.git synced 2026-02-24 05:15:23 +00:00

Fix focus not changing on (empty) workspace change (#1243)

This commit is contained in:
Julian Schuler
2022-12-17 18:28:43 +01:00
committed by GitHub
parent 11ba6afdd3
commit a3b37b0191

View File

@ -781,6 +781,10 @@ void CKeybindManager::changeworkspace(std::string args) {
g_pInputManager->refocus();
} else if (g_pCompositor->getWindowsOnWorkspace(PWORKSPACETOCHANGETO->m_iID) > 0)
g_pInputManager->refocus();
else {
// if there are no windows on the workspace, just unfocus the window on the previous workspace
g_pCompositor->focusWindow(nullptr);
}
// set the new monitor as the last (no warps would bug otherwise)
g_pCompositor->setActiveMonitor(g_pCompositor->getMonitorFromID(PWORKSPACETOCHANGETO->m_iMonitorID));