diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-09-05 21:36:22 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-09-05 21:36:22 +0200 |
| commit | 94ca386a8c298265fa5fb19ee2ec2be3db335502 (patch) | |
| tree | 4c3d26fb5936e7b62584fd4f080b6b89aeb116a8 /src/managers/KeybindManager.cpp | |
| parent | 2ba7cb2414a5cf893a64992756fcd283872ae956 (diff) | |
set last monitor and dont refocus in some cases (changeworkspace)
Diffstat (limited to 'src/managers/KeybindManager.cpp')
| -rw-r--r-- | src/managers/KeybindManager.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index c1ef0cfe..d5b6014a 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -658,9 +658,12 @@ void CKeybindManager::changeworkspace(std::string args) { if (g_pCompositor->cursorOnReservedArea()) // fix focus on bars etc g_pInputManager->refocus(); - } else + } else if (g_pCompositor->getWindowsOnWorkspace(PWORKSPACETOCHANGETO->m_iID) > 0) g_pInputManager->refocus(); + // set the new monitor as the last (no warps would bug otherwise) + g_pCompositor->m_pLastMonitor = g_pCompositor->getMonitorFromID(PWORKSPACETOCHANGETO->m_iMonitorID); + // mark the monitor dirty g_pHyprRenderer->damageMonitor(PMONITOR); |
