xwaylandmgr: proper clamping for setWindowSize

closes #4622 fixes #4621
This commit is contained in:
Vaxry 2024-02-05 20:56:20 +00:00
parent f9202f791e
commit 1fd82e37a7

View file

@ -151,7 +151,7 @@ void CHyprXWaylandManager::setWindowSize(CWindow* pWindow, Vector2D size, bool f
const auto PMONITOR = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID); const auto PMONITOR = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID);
size = size.clamp(Vector2D{0, 0}); size = size.clamp(Vector2D{0, 0}, Vector2D{std::numeric_limits<double>::infinity(), std::numeric_limits<double>::infinity()});
// calculate pos // calculate pos
// TODO: this should be decoupled from setWindowSize IMO // TODO: this should be decoupled from setWindowSize IMO