diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-30 20:16:23 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-30 20:16:23 +0200 |
| commit | f794c91293ca4249fe0883bad4371a4e9e8d4344 (patch) | |
| tree | dcf11d4415b95ecd5a896e967115e50e63a5e32a /src/layout/DwindleLayout.cpp | |
| parent | e49657f0f927abbe9ef9b5f9b5714ca1adeec99d (diff) | |
windows on top of fullscreen, lastmonitor fixes
Diffstat (limited to 'src/layout/DwindleLayout.cpp')
| -rw-r--r-- | src/layout/DwindleLayout.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index acff1fb2..58eca936 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -359,7 +359,7 @@ void CHyprDwindleLayout::onWindowCreatedFloating(CWindow* pWindow) { Vector2D middlePoint = Vector2D(desiredGeometry.x, desiredGeometry.y) + Vector2D(desiredGeometry.width, desiredGeometry.height) / 2.f; // TODO: detect a popup in a more consistent way. - if (g_pCompositor->getMonitorFromVector(middlePoint)->ID != pWindow->m_iMonitorID || (desiredGeometry.x == 0 && desiredGeometry.y == 0)) { + if ((g_pCompositor->getMonitorFromVector(middlePoint) && g_pCompositor->getMonitorFromVector(middlePoint)->ID != pWindow->m_iMonitorID) || (desiredGeometry.x == 0 && desiredGeometry.y == 0)) { // if it's not, fall back to the center placement pWindow->m_vEffectivePosition = PMONITOR->vecPosition + Vector2D((PMONITOR->vecSize.x - desiredGeometry.width) / 2.f, (PMONITOR->vecSize.y - desiredGeometry.height) / 2.f); } else { |
