diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-04-24 17:53:50 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-04-24 17:53:50 +0200 |
| commit | c35517d44e983524760109ea7864c2ace91e5f9e (patch) | |
| tree | 1f03f2200d676b04210e039a41f59e6ebc729f01 /src/layout/DwindleLayout.cpp | |
| parent | 86bb95c125563300a50973ab50eec44c2943b9d1 (diff) | |
fixes for xwayland popups, autofloat pop-up and task_dialog
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 8a6bd6d9..15fa1c44 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -551,8 +551,8 @@ 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; - // TODO: detect a popup in a more consistent way. - if ((g_pCompositor->getMonitorFromVector(middlePoint) && g_pCompositor->getMonitorFromVector(middlePoint)->ID != pWindow->m_iMonitorID) || (desiredGeometry.x == 0 && desiredGeometry.y == 0)) { + // TODO: detect a popup in a more consistent way. + if (!g_pCompositor->isPointOnAnyMonitor(middlePoint) || (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 { |
