aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-04-16 09:37:18 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-04-16 09:42:26 +0000
commit979f48a62f4d42f0d9637976cacf16d7bbcb2b84 (patch)
treed088c859a860e502a28d17d12d70fae2caaa9956 /render.c
parentwayland: add helper functions wayl_win_csd_{titlebar,borders}_visible() (diff)
render: take (visible) CSD border size into account when setting initial size
Diffstat (limited to 'render.c')
-rw-r--r--render.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/render.c b/render.c
index 0d5f4286..7ad8704d 100644
--- a/render.c
+++ b/render.c
@@ -3581,6 +3581,11 @@ maybe_resize(struct terminal *term, int width, int height, bool force)
if (wayl_win_csd_titlebar_visible(term->window))
height -= term->conf->csd.title_height;
+ if (wayl_win_csd_borders_visible(term->window)) {
+ height -= 2 * term->conf->csd.border_width_visible;
+ width -= 2 * term->conf->csd.border_width_visible;
+ }
+
width *= scale;
height *= scale;
break;