layout: always center floating xdg windows

This commit is contained in:
vaxerski 2023-09-03 13:07:40 +02:00
parent e6ca4b6eee
commit c6c820d16d

View File

@ -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 {