diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-08-05 18:10:59 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-08-05 18:10:59 +0200 |
| commit | cd37a1533e0e86fffdd333e18bab0bb730c1dc25 (patch) | |
| tree | fb32becc5c231a19b80fb911a8d60a1ce41869b1 /src/layout/DwindleLayout.cpp | |
| parent | 575434f1a4cfce30cf89b62e5f1cce4b3c326b6e (diff) | |
reject tiling windows that do not meet the max size requirement
Diffstat (limited to 'src/layout/DwindleLayout.cpp')
| -rw-r--r-- | src/layout/DwindleLayout.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index 6abcaf5f..f779147e 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -246,6 +246,15 @@ void CHyprDwindleLayout::onWindowCreatedTiling(CWindow* pWindow) { OPENINGON = getFirstNodeOnWorkspace(PNODE->workspaceID); } + // first, check if OPENINGON isn't too big. + if (const auto MAXSIZE = g_pXWaylandManager->getMaxSizeForWindow(pWindow); MAXSIZE.x < OPENINGON->size.x || MAXSIZE.y < OPENINGON->size.y) { + // we can't continue. make it floating. + pWindow->m_bIsFloating = true; + m_lDwindleNodesData.remove(*PNODE); + g_pLayoutManager->getCurrentLayout()->onWindowCreatedFloating(pWindow); + return; + } + // if it's the first, it's easy. Make it fullscreen. if (!OPENINGON || OPENINGON->pWindow == pWindow) { PNODE->position = PMONITOR->vecPosition + PMONITOR->vecReservedTopLeft; |
