diff options
author | Sevz <leohdz172@protonmail.com> | 2022-03-20 12:48:15 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-20 12:48:15 -0600 |
commit | 44932053baad8517072a99a90612f0ac932ffa44 (patch) | |
tree | bb7b432a43d53366aa4be7bcfed9e816cd46f400 /client.h | |
parent | 1dfd867d9caa61d9f3fabf695a72b2fea35b6193 (diff) | |
parent | dd463b25c7de4ea802038997a93ea749297b8c2d (diff) |
Merge pull request #204 from djpohly/scenegraph3
merge scenegraph3
Diffstat (limited to 'client.h')
-rw-r--r-- | client.h | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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) { |