summaryrefslogtreecommitdiff
path: root/src/layout
diff options
context:
space:
mode:
Diffstat (limited to 'src/layout')
-rw-r--r--src/layout/DwindleLayout.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp
index 2b69e2d9..129c2142 100644
--- a/src/layout/DwindleLayout.cpp
+++ b/src/layout/DwindleLayout.cpp
@@ -294,4 +294,13 @@ void CHyprDwindleLayout::onMouseMove(const Vector2D& mousePos) {
g_pXWaylandManager->setWindowSize(DRAGGINGWINDOW, DRAGGINGWINDOW->m_vRealSize);
}
+
+ // get middle point
+ Vector2D middle = DRAGGINGWINDOW->m_vRealPosition + DRAGGINGWINDOW->m_vRealSize / 2.f;
+
+ // and check its monitor
+ const auto PMONITOR = g_pCompositor->getMonitorFromVector(middle);
+
+ if (PMONITOR)
+ DRAGGINGWINDOW->m_iMonitorID = PMONITOR->ID;
} \ No newline at end of file