From 6dcd6f21b91c4bc4f3775543ea18a6fef1e5fc1e Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 21 Mar 2022 17:24:41 +0100 Subject: create floating windows correctly --- src/managers/XWaylandManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/managers/XWaylandManager.cpp') diff --git a/src/managers/XWaylandManager.cpp b/src/managers/XWaylandManager.cpp index 8369fe4f..46e7a84b 100644 --- a/src/managers/XWaylandManager.cpp +++ b/src/managers/XWaylandManager.cpp @@ -101,6 +101,11 @@ bool CHyprXWaylandManager::shouldBeFloated(CWindow* pWindow) { const auto SIZEHINTS = pWindow->m_uSurface.xwayland->size_hints; if (SIZEHINTS && SIZEHINTS->min_width > 0 && SIZEHINTS->min_height > 0 && (SIZEHINTS->max_width == SIZEHINTS->min_width || SIZEHINTS->max_height == SIZEHINTS->min_height)) return true; + } else { + const auto PSTATE = &pWindow->m_uSurface.xdg->toplevel->current; + + if ((PSTATE->min_width != 0 && PSTATE->min_height != 0 && (PSTATE->min_width == PSTATE->max_width || PSTATE->min_height == PSTATE->max_height)) || pWindow->m_uSurface.xdg->toplevel->parent) + return true; } return false; -- cgit v1.2.3