aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-02-25 18:16:23 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-02-25 18:16:23 +0000
commita4d77608b9a44a06313dd7dcae004ba3818c5bee (patch)
tree9c4270b9b2f8da0b3e7c6814ddad785d80ba993c
parentrender: render_resize(): don't allow too small window sizes (diff)
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.
-rw-r--r--wayland.c7
1 files changed, 7 insertions, 0 deletions
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 = {