diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-08-05 20:00:17 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-08-05 20:00:17 +0200 |
| commit | f66365d9dad8ead1bcb7f1b7cdb4820cd9afce2e (patch) | |
| tree | e0513f88b80c0d4c666624496e8b4f375d881f32 /src/layout/DwindleLayout.cpp | |
| parent | b30bb22bb81973cd98f9b0f612bf7750243a940e (diff) | |
fix crash in dwindle on create tiled
Diffstat (limited to 'src/layout/DwindleLayout.cpp')
| -rw-r--r-- | src/layout/DwindleLayout.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index f779147e..18f0d9f2 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -247,7 +247,8 @@ void CHyprDwindleLayout::onWindowCreatedTiling(CWindow* pWindow) { } // 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) { + const auto PREDSIZEMAX = OPENINGON ? Vector2D(OPENINGON->size.x, OPENINGON->size.y) : PMONITOR->vecSize; + if (const auto MAXSIZE = g_pXWaylandManager->getMaxSizeForWindow(pWindow); MAXSIZE.x < PREDSIZEMAX.x || MAXSIZE.y < PREDSIZEMAX.y) { // we can't continue. make it floating. pWindow->m_bIsFloating = true; m_lDwindleNodesData.remove(*PNODE); |
