Xwayland: fix has_fixed_size heuristic for floating

This commit is contained in:
Isaac Freund 2023-03-02 17:11:32 +01:00
parent 9bfa0ece23
commit 56e4efe68d
No known key found for this signature in database
GPG Key ID: 86DED400DDFD7A11

View File

@ -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;