diff options
| author | MightyPlaza <123664421+MightyPlaza@users.noreply.github.com> | 2024-10-30 18:58:36 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-30 18:58:36 +0000 |
| commit | 12c1bb936dd463c4188def1c73c2bb786433a6dc (patch) | |
| tree | d59596edbf4c4ffa0581b92e3bbcf5710e9758e6 /src/layout/MasterLayout.cpp | |
| parent | 5f721dce36651232ae245d872c17dfa3aae5cc6c (diff) | |
internal: check size limit in layouts (#8298)
modified: src/desktop/Window.cpp
modified: src/desktop/Window.hpp
modified: src/events/Windows.cpp
modified: src/helpers/MiscFunctions.cpp
modified: src/helpers/MiscFunctions.hpp
modified: src/layout/DwindleLayout.cpp
modified: src/layout/IHyprLayout.cpp
modified: src/layout/MasterLayout.cpp
modified: src/macros.hpp
Diffstat (limited to 'src/layout/MasterLayout.cpp')
| -rw-r--r-- | src/layout/MasterLayout.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index a2321a41..afe79ecf 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -706,7 +706,9 @@ void CHyprMasterLayout::resizeActiveWindow(const Vector2D& pixResize, eRectCorne const auto PNODE = getNodeFromWindow(PWINDOW); if (!PNODE) { - PWINDOW->m_vRealSize = Vector2D(std::max((PWINDOW->m_vRealSize.goal() + pixResize).x, 20.0), std::max((PWINDOW->m_vRealSize.goal() + pixResize).y, 20.0)); + PWINDOW->m_vRealSize = + (PWINDOW->m_vRealSize.goal() + pixResize) + .clamp(PWINDOW->m_sWindowData.minSize.valueOr(Vector2D{MIN_WINDOW_SIZE, MIN_WINDOW_SIZE}), PWINDOW->m_sWindowData.maxSize.valueOr(Vector2D{INFINITY, INFINITY})); PWINDOW->updateWindowDecos(); return; } |
