summaryrefslogtreecommitdiff
path: root/src/managers/XWaylandManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-03-21 17:24:41 +0100
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-03-21 17:24:41 +0100
commit6dcd6f21b91c4bc4f3775543ea18a6fef1e5fc1e (patch)
tree289456ea1c470b1110ec415bc7e7c03d210ebbca /src/managers/XWaylandManager.cpp
parent51ce922ae1dac73181957bb0082a61d7467c19ba (diff)
create floating windows correctly
Diffstat (limited to 'src/managers/XWaylandManager.cpp')
-rw-r--r--src/managers/XWaylandManager.cpp5
1 files changed, 5 insertions, 0 deletions
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;