diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-22 21:28:57 +0100 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-22 21:28:57 +0100 |
| commit | 2bc29f32ec087f8577ff1fd6bb031ea47b133057 (patch) | |
| tree | c8e28248bd97fed18669c5d86b9a3f9cc5b15afd /src/layout/DwindleLayout.cpp | |
| parent | e6a848adc0648bed29bb232ca5ee421ac6f575f9 (diff) | |
finally fixed XWayland popups
Diffstat (limited to 'src/layout/DwindleLayout.cpp')
| -rw-r--r-- | src/layout/DwindleLayout.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index 38589a3d..904c3f31 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -335,13 +335,13 @@ void CHyprDwindleLayout::onWindowCreatedFloating(CWindow* pWindow) { // check if it's on the correct monitor! Vector2D middlePoint = Vector2D(desiredGeometry.x, desiredGeometry.y) + Vector2D(desiredGeometry.width, desiredGeometry.height) / 2.f; - if (g_pCompositor->getMonitorFromVector(middlePoint)->ID != pWindow->m_iMonitorID) { + // 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 it's not, fall back to the center placement pWindow->m_vRealPosition = PMONITOR->vecPosition + Vector2D((PMONITOR->vecSize.x - desiredGeometry.width) / 2.f, (PMONITOR->vecSize.y - desiredGeometry.height) / 2.f); } else { // if it is, we respect where it wants to put itself. // most of these are popups - // TODO: detect a popup in a more consistent way. pWindow->m_vRealPosition = Vector2D(desiredGeometry.x, desiredGeometry.y); } } |
