From a4d77608b9a44a06313dd7dcae004ba3818c5bee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 25 Feb 2020 19:16:23 +0100 Subject: [PATCH] wayland: decoration-configure: call render_resize() to add/remove CSDs Call render_resize_force() when the decoration type changes run-time. This ensures the CSDs are drawn when changing from server -> client side decorations, and removed when going the other way. --- wayland.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wayland.c b/wayland.c index d67bd268..292f711d 100644 --- a/wayland.c +++ b/wayland.c @@ -554,6 +554,13 @@ xdg_toplevel_decoration_configure(void *data, LOG_ERR("unimplemented: unknown XDG toplevel decoration mode: %u", mode); break; } + + if (win->is_configured) { + struct terminal *term = win->term; + int scale = term->scale; + + render_resize_force(term, term->width / scale, term->height / scale); + } } static const struct zxdg_toplevel_decoration_v1_listener xdg_toplevel_decoration_listener = {