summaryrefslogtreecommitdiff
path: root/src/layout/IHyprLayout.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-08-05 18:10:59 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-08-05 18:10:59 +0200
commitcd37a1533e0e86fffdd333e18bab0bb730c1dc25 (patch)
treefb32becc5c231a19b80fb911a8d60a1ce41869b1 /src/layout/IHyprLayout.cpp
parent575434f1a4cfce30cf89b62e5f1cce4b3c326b6e (diff)
reject tiling windows that do not meet the max size requirement
Diffstat (limited to 'src/layout/IHyprLayout.cpp')
-rw-r--r--src/layout/IHyprLayout.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp
index 48e6b005..bbe30e5b 100644
--- a/src/layout/IHyprLayout.cpp
+++ b/src/layout/IHyprLayout.cpp
@@ -184,14 +184,7 @@ void IHyprLayout::onMouseMove(const Vector2D& mousePos) {
} else {
if (DRAGGINGWINDOW->m_bIsFloating) {
- auto MAXSIZE = DRAGGINGWINDOW->m_bIsX11 ?
- Vector2D(DRAGGINGWINDOW->m_uSurface.xwayland->size_hints->max_width, DRAGGINGWINDOW->m_uSurface.xwayland->size_hints->max_height)
- : Vector2D(DRAGGINGWINDOW->m_uSurface.xdg->toplevel->current.max_width, DRAGGINGWINDOW->m_uSurface.xdg->toplevel->current.max_height);
-
- if (MAXSIZE.x < 5)
- MAXSIZE.x = 99999;
- if (MAXSIZE.y < 5)
- MAXSIZE.y = 99999;
+ const auto MAXSIZE = g_pXWaylandManager->getMaxSizeForWindow(DRAGGINGWINDOW);
DRAGGINGWINDOW->m_vRealSize.setValueAndWarp(m_vBeginDragSizeXY + DELTA);
DRAGGINGWINDOW->m_vRealSize.setValueAndWarp(Vector2D(std::clamp(DRAGGINGWINDOW->m_vRealSize.vec().x, (double)20, (double)MAXSIZE.x), std::clamp(DRAGGINGWINDOW->m_vRealSize.vec().y, (double)20, (double)MAXSIZE.y)));