From a32db11f16fae3f57af3795d2463996b95e7ba1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?= Date: Thu, 9 Jun 2022 12:45:42 -0500 Subject: [PATCH] set client bounds at resize --- client.h | 10 ++++++++++ dwl.c | 1 + 2 files changed, 11 insertions(+) diff --git a/client.h b/client.h index 6648c59..9431d11 100644 --- a/client.h +++ b/client.h @@ -45,6 +45,16 @@ client_activate_surface(struct wlr_surface *s, int activated) wlr_xdg_toplevel_set_activated(surface->toplevel, activated); } +static inline uint32_t +client_set_bounds(Client *c, int32_t width, int32_t height) +{ +#ifdef XWAYLAND + if (client_is_x11(c)) + return 0; +#endif + return wlr_xdg_toplevel_set_bounds(c->surface.xdg->toplevel, width, height); +} + static inline void client_for_each_surface(Client *c, wlr_surface_iterator_func_t fn, void *data) { diff --git a/dwl.c b/dwl.c index 852eecf..b56abd7 100644 --- a/dwl.c +++ b/dwl.c @@ -1582,6 +1582,7 @@ resize(Client *c, int x, int y, int w, int h, int interact) { int min_width = 0, min_height = 0; struct wlr_box *bbox = interact ? &sgeom : &c->mon->w; + client_set_bounds(c, w, h); client_min_size(c, &min_width, &min_height); c->geom.x = x; c->geom.y = y;