aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Freund <mail@isaacfreund.com>2023-03-02 17:11:32 +0100
committerIsaac Freund <mail@isaacfreund.com>2023-03-02 17:11:32 +0100
commit56e4efe68d51606efdf5ffeb99a824edc35e0821 (patch)
tree76ef838f4c767555064d45623de80f4277fde795
parent9bfa0ece2343a1fc7246d40b78cdd77eb7daca77 (diff)
downloadriver-56e4efe68d51606efdf5ffeb99a824edc35e0821.tar.gz
river-56e4efe68d51606efdf5ffeb99a824edc35e0821.tar.xz
Xwayland: fix has_fixed_size heuristic for floating
-rw-r--r--river/XwaylandView.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/river/XwaylandView.zig b/river/XwaylandView.zig
index 0a7c62a..4befec0 100644
--- a/river/XwaylandView.zig
+++ b/river/XwaylandView.zig
@@ -181,8 +181,9 @@ pub fn handleMap(listener: *wl.Listener(*wlr.XwaylandSurface), xwayland_surface:
view.inflight.box = view.pending.box;
view.current.box = view.pending.box;
+ // A value of -1 seems to indicate being unset for these size hints.
const has_fixed_size = if (self.xwayland_surface.size_hints) |size_hints|
- size_hints.min_width != 0 and size_hints.min_height != 0 and
+ size_hints.min_width > 0 and size_hints.min_height > 0 and
(size_hints.min_width == size_hints.max_width or size_hints.min_height == size_hints.max_height)
else
false;