git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commit407287b2ed479890f3d47ad7c8c822c8d4bf3301
parent84f785f960
authorIsaac Freund <[email protected]>
date2023-03-02 17:11
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;