From c6c820d16d87c175719569e7ac8c5088ea63f0b2 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 3 Sep 2023 13:07:40 +0200 Subject: [PATCH] layout: always center floating xdg windows --- src/layout/IHyprLayout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp index c5d45129..c05582bd 100644 --- a/src/layout/IHyprLayout.cpp +++ b/src/layout/IHyprLayout.cpp @@ -141,7 +141,7 @@ void IHyprLayout::onWindowCreatedFloating(CWindow* pWindow) { } // TODO: detect a popup in a more consistent way. - if ((desiredGeometry.x == 0 && desiredGeometry.y == 0) || !visible) { + if ((desiredGeometry.x == 0 && desiredGeometry.y == 0) || !visible || !pWindow->m_bIsX11) { // 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 {