render: take (visible) CSD border size into account when setting initial size

This commit is contained in:
Daniel Eklöf 2022-04-16 11:37:18 +02:00
parent f9103d4381
commit 979f48a62f
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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;