mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-22 07:49:49 +01:00
Fix focus not changing on (empty) workspace change (#1243)
This commit is contained in:
parent
11ba6afdd3
commit
a3b37b0191
1 changed files with 4 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue