summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-05-30 17:11:35 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-05-30 17:11:35 +0200
commitc44c79abb269da36b68d0524f45aa4c0b92dedca (patch)
tree3f26da11b68bbab2b3f736a08ac0266c551cb2cd /src/Compositor.cpp
parent1e096f6fcd514b6e2c9d5dbd2b1bbcbcb3c9b4a5 (diff)
fix monitor cleanups on removed
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 0b60369d..4239c7bf 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -936,4 +936,21 @@ void CCompositor::updateWindowBorderColor(CWindow* pWindow) {
pWindow->m_cRealBorderColor = RENDERDATA.borderColor;
else
pWindow->m_cRealBorderColor = CColor(pWindow == m_pLastWindow ? *ACTIVECOL : *INACTIVECOL);
-} \ No newline at end of file
+}
+
+void CCompositor::moveWindowToWorkspace(CWindow* pWindow, const std::string& work) {
+ m_pLastWindow = pWindow;
+ g_pKeybindManager->moveActiveToWorkspace(work);
+
+ g_pInputManager->refocus();
+}
+
+int CCompositor::getNextAvailableMonitorID() {
+ int64_t topID = -1;
+ for (auto& m : m_lMonitors) {
+ if ((int64_t)m.ID > topID)
+ topID = m.ID;
+ }
+
+ return topID + 1;
+}