diff options
author | thejch <[email protected]> | 2024-03-24 18:50:41 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2024-03-25 01:50:41 +0000 |
commit | 356414639fc06ace7045236ec41d673342981057 (patch) | |
tree | eaddcbda1bdefa8a4202468d0be6fb3e8858b2e0 | |
parent | 6b28bf563e3b4e5f6631985f24c88e8a8ebaa0d4 (diff) | |
download | Hyprland-356414639fc06ace7045236ec41d673342981057.tar.gz Hyprland-356414639fc06ace7045236ec41d673342981057.zip |
core: fix missing workspace events during swapping (#5251)
-rw-r--r-- | src/Compositor.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 9ae1adfb..bf6c4200 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -2053,6 +2053,11 @@ void CCompositor::swapActiveWorkspaces(CMonitor* pMonitorA, CMonitor* pMonitorB) const auto LASTWIN = pMonitorA->ID == g_pCompositor->m_pLastMonitor->ID ? PWORKSPACEB->getLastFocusedWindow() : PWORKSPACEA->getLastFocusedWindow(); g_pCompositor->focusWindow(LASTWIN ? LASTWIN : (g_pCompositor->vectorToWindowUnified(g_pInputManager->getMouseCoordsInternal(), RESERVED_EXTENTS | INPUT_EXTENTS | ALLOW_FLOATING))); + + const auto PNEWWORKSPACE = pMonitorA->ID == g_pCompositor->m_pLastMonitor->ID ? PWORKSPACEB : PWORKSPACEA; + g_pEventManager->postEvent(SHyprIPCEvent{"workspace", PNEWWORKSPACE->m_szName}); + g_pEventManager->postEvent(SHyprIPCEvent{"workspacev2", std::format("{},{}", PNEWWORKSPACE->m_iID, PNEWWORKSPACE->m_szName)}); + EMIT_HOOK_EVENT("workspace", PNEWWORKSPACE); } // event |