mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
render: resize: exclude CSD borders when loading default geometry in maximized mode
This commit is contained in:
parent
b44bbb5b2b
commit
e7e553ae5b
1 changed files with 17 additions and 6 deletions
23
render.c
23
render.c
|
|
@ -1198,13 +1198,24 @@ maybe_resize(struct terminal *term, int width, int height, bool force)
|
|||
width = term->unmaximized_width;
|
||||
height = term->unmaximized_height;
|
||||
} else {
|
||||
width = term->conf->width * scale;
|
||||
height = term->conf->height * scale;
|
||||
width = term->conf->width;
|
||||
height = term->conf->height;
|
||||
|
||||
#if FOOT_CSD_OUTSIDE
|
||||
width -= 2 * csd_border;
|
||||
height -= 2 * csd_border + csd_title;
|
||||
#endif
|
||||
if (term->window->use_csd == CSD_YES) {
|
||||
assert(!term->window->is_fullscreen);
|
||||
|
||||
/* Account for CSDs, to make actual window size match
|
||||
* the configured size */
|
||||
if (!term->window->is_maximized) {
|
||||
width -= 2 * csd_border_size;
|
||||
height -= 2 * csd_border_size + csd_title_size;
|
||||
} else {
|
||||
height -= csd_title_size;
|
||||
}
|
||||
}
|
||||
|
||||
width *= scale;
|
||||
height *= scale;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue