diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-11-03 19:34:26 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-11-03 19:34:26 +0000 |
| commit | 653b9ed0e4933d83b2e3f378cdc76f1ebeb97e51 (patch) | |
| tree | a2bd2be04f58694c1423c9a6dca506746d7e061d /src/managers/KeybindManager.cpp | |
| parent | d0e47d9fe09dfa3be0c46833bee832ddbe0fcb51 (diff) | |
Fix missing focusedmon event on focusmonitor dispatcher
Diffstat (limited to 'src/managers/KeybindManager.cpp')
| -rw-r--r-- | src/managers/KeybindManager.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 8c4fa24b..e690c7f3 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -722,6 +722,10 @@ void CKeybindManager::changeworkspace(std::string args) { if (anotherMonitor) { Vector2D middle = PMONITOR->vecPosition + PMONITOR->vecSize / 2.f; g_pCompositor->warpCursorTo(middle); + + // event for focusedmon, as we changed. + g_pEventManager->postEvent(SHyprIPCEvent{"focusedmon", PMONITOR->szName + "," + PWORKSPACETOCHANGETO->m_szName}); + g_pCompositor->m_pLastMonitor = PMONITOR; } // set active and deactivate all other in wlr @@ -1135,7 +1139,7 @@ void CKeybindManager::alterSplitRatio(std::string args) { void CKeybindManager::focusMonitor(std::string arg) { const auto PMONITOR = g_pCompositor->getMonitorFromString(arg); - if (!PMONITOR) + if (!PMONITOR || PMONITOR == g_pCompositor->m_pLastMonitor) return; changeworkspace("[internal]" + std::to_string(PMONITOR->activeWorkspace)); |
