From 56e4efe68d51606efdf5ffeb99a824edc35e0821 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Thu, 2 Mar 2023 17:11:32 +0100 Subject: [PATCH] Xwayland: fix has_fixed_size heuristic for floating --- river/XwaylandView.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;