diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2022-04-16 08:47:55 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2022-04-16 08:57:45 +0000 |
| commit | 0e477e2c5e55fd391aa5adef32789a9b7c3f3024 (patch) | |
| tree | ad09ef8c91f126a644876fc122beb811c5d0b91d /render.c | |
| parent | fix some small typos (diff) | |
render: take visible border width into account when setting window geometry
This fixes e.g. window snapping in GNOME.
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -3760,16 +3760,23 @@ damage_view: #endif { - bool title_shown = !term->window->is_fullscreen && + bool title_shown = + !term->window->is_fullscreen && + term->window->csd_mode == CSD_YES; + + bool border_shown = + !term->window->is_fullscreen && + !term->window->is_maximized && term->window->csd_mode == CSD_YES; int title_height = title_shown ? term->conf->csd.title_height : 0; + int border_width = border_shown ? term->conf->csd.border_width_visible : 0; xdg_surface_set_window_geometry( term->window->xdg_surface, - 0, - -title_height, - term->width / term->scale, - term->height / term->scale + title_height); + -border_width, + -title_height - border_width, + term->width / term->scale + 2 * border_width, + term->height / term->scale + title_height + 2 * border_width); } tll_free(term->normal.scroll_damage); |
