mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 16:05:58 +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();
|
g_pInputManager->refocus();
|
||||||
} else if (g_pCompositor->getWindowsOnWorkspace(PWORKSPACETOCHANGETO->m_iID) > 0)
|
} else if (g_pCompositor->getWindowsOnWorkspace(PWORKSPACETOCHANGETO->m_iID) > 0)
|
||||||
g_pInputManager->refocus();
|
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)
|
// set the new monitor as the last (no warps would bug otherwise)
|
||||||
g_pCompositor->setActiveMonitor(g_pCompositor->getMonitorFromID(PWORKSPACETOCHANGETO->m_iMonitorID));
|
g_pCompositor->setActiveMonitor(g_pCompositor->getMonitorFromID(PWORKSPACETOCHANGETO->m_iMonitorID));
|
||||||
|
|
Loading…
Reference in a new issue