From f9202f791e3690ad248c842158ee9fa9e1105ea6 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 5 Feb 2024 14:08:08 +0000 Subject: [PATCH] xwaylandmgr: clamp size in setWindowSize fixes #4586 --- src/managers/XWaylandManager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/managers/XWaylandManager.cpp b/src/managers/XWaylandManager.cpp index 63b8cca0..6b3ad048 100644 --- a/src/managers/XWaylandManager.cpp +++ b/src/managers/XWaylandManager.cpp @@ -151,6 +151,8 @@ void CHyprXWaylandManager::setWindowSize(CWindow* pWindow, Vector2D size, bool f const auto PMONITOR = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID); + size = size.clamp(Vector2D{0, 0}); + // calculate pos // TODO: this should be decoupled from setWindowSize IMO Vector2D windowPos = pWindow->m_vRealPosition.vec();