From 949655005a8e6bff5d1e05c9f6b28668fa910f0b Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 26 Aug 2022 16:05:02 +0200 Subject: [PATCH] added an event for moving workspace --- src/Compositor.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 85f69636..f172ce56 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1339,6 +1339,10 @@ void CCompositor::swapActiveWorkspaces(CMonitor* pMonitorA, CMonitor* pMonitorB) g_pLayoutManager->getCurrentLayout()->recalculateMonitor(pMonitorB->ID); g_pInputManager->refocus(); + + // event + g_pEventManager->postEvent(SHyprIPCEvent{"moveworkspace", PWORKSPACEA->m_szName + "," + pMonitorB->szName}); + g_pEventManager->postEvent(SHyprIPCEvent{"moveworkspace", PWORKSPACEB->m_szName + "," + pMonitorA->szName}); } CMonitor* CCompositor::getMonitorFromString(const std::string& name) { @@ -1449,6 +1453,9 @@ void CCompositor::moveWorkspaceToMonitor(CWorkspace* pWorkspace, CMonitor* pMoni g_pLayoutManager->getCurrentLayout()->recalculateMonitor(POLDMON->ID); g_pInputManager->refocus(); + + // event + g_pEventManager->postEvent(SHyprIPCEvent{"moveworkspace", pWorkspace->m_szName + "," + pMonitor->szName}); } bool CCompositor::workspaceIDOutOfBounds(const int& id) {