diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2025-12-27 12:43:45 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-27 12:43:45 +0100 |
| commit | 42447a50d6840c5e28bd58db1225bae2fd7d5ed0 (patch) | |
| tree | e73584ecd482bf5320a3e35f963a12787ce7cce5 /src/layout/MasterLayout.cpp | |
| parent | d7f26038ee2b44f3d02fe2a7556bafb91a02f46e (diff) | |
rules/windowRuleApplicator: fix min/max size effects (#12491)
fixes #12412
Diffstat (limited to 'src/layout/MasterLayout.cpp')
| -rw-r--r-- | src/layout/MasterLayout.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index 1546fad5..d677d7b6 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -207,7 +207,7 @@ void CHyprMasterLayout::onWindowCreatedTiling(PHLWINDOW pWindow, eDirection dire PNODE->percMaster = lastSplitPercent; // first, check if it isn't too big. - if (const auto MAXSIZE = pWindow->requestedMaxSize(); MAXSIZE.x < PMONITOR->m_size.x * lastSplitPercent || MAXSIZE.y < PMONITOR->m_size.y) { + if (const auto MAXSIZE = pWindow->maxSize().value_or(Math::VECTOR2D_MAX); MAXSIZE.x < PMONITOR->m_size.x * lastSplitPercent || MAXSIZE.y < PMONITOR->m_size.y) { // we can't continue. make it floating. pWindow->m_isFloating = true; m_masterNodesData.remove(*PNODE); @@ -219,7 +219,7 @@ void CHyprMasterLayout::onWindowCreatedTiling(PHLWINDOW pWindow, eDirection dire PNODE->percMaster = lastSplitPercent; // first, check if it isn't too big. - if (const auto MAXSIZE = pWindow->requestedMaxSize(); + if (const auto MAXSIZE = pWindow->maxSize().value_or(Math::VECTOR2D_MAX); MAXSIZE.x < PMONITOR->m_size.x * (1 - lastSplitPercent) || MAXSIZE.y < PMONITOR->m_size.y * (1.f / (WINDOWSONWORKSPACE - 1))) { // we can't continue. make it floating. pWindow->m_isFloating = true; |
