aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-08-26 16:05:02 +0200
committervaxerski <[email protected]>2022-08-26 16:05:02 +0200
commit949655005a8e6bff5d1e05c9f6b28668fa910f0b (patch)
tree1da93e057abf212990f27f4f90e7e73aafce166f
parent56caba5f019c9869594bbae32e693d0a59eaf41e (diff)
downloadHyprland-949655005a8e6bff5d1e05c9f6b28668fa910f0b.tar.gz
Hyprland-949655005a8e6bff5d1e05c9f6b28668fa910f0b.zip
added an event for moving workspace
-rw-r--r--src/Compositor.cpp7
1 files changed, 7 insertions, 0 deletions
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) {