summaryrefslogtreecommitdiff
path: root/client.h
diff options
context:
space:
mode:
Diffstat (limited to 'client.h')
-rw-r--r--client.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/client.h b/client.h
index 22454a5..a5fc0d2 100644
--- a/client.h
+++ b/client.h
@@ -180,6 +180,26 @@ client_surface_at(Client *c, double cx, double cy, double *sx, double *sy)
return wlr_xdg_surface_surface_at(c->surface.xdg, cx, cy, sx, sy);
}
+static inline void
+client_min_size(Client *c, int *width, int *height)
+{
+ struct wlr_xdg_toplevel *toplevel;
+ struct wlr_xdg_toplevel_state *state;
+#ifdef XWAYLAND
+ if (client_is_x11(c)) {
+ struct wlr_xwayland_surface_size_hints *size_hints;
+ size_hints = c->surface.xwayland->size_hints;
+ *width = size_hints->min_width;
+ *height = size_hints->min_height;
+ return;
+ }
+#endif
+ toplevel = c->surface.xdg->toplevel;
+ state = &toplevel->current;
+ *width = state->min_width;
+ *height = state->min_height;
+}
+
static inline Client *
client_from_popup(struct wlr_xdg_popup *popup)
{