aboutsummaryrefslogtreecommitdiff
path: root/client.h
diff options
context:
space:
mode:
authorSevz <leohdz172@protonmail.com>2022-03-20 12:48:15 -0600
committerGitHub <noreply@github.com>2022-03-20 12:48:15 -0600
commit44932053baad8517072a99a90612f0ac932ffa44 (patch)
treebb7b432a43d53366aa4be7bcfed9e816cd46f400 /client.h
parent1dfd867d9caa61d9f3fabf695a72b2fea35b6193 (diff)
parentdd463b25c7de4ea802038997a93ea749297b8c2d (diff)
Merge pull request #204 from djpohly/scenegraph3
merge scenegraph3
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)
{