feature: add resize-by-cells option to constrain window sizes...

...to multiples of the cell size, and preserve grid size when changing
fonts or display scales in floating windows.
This commit is contained in:
Andrew J. Hesford 2024-01-17 15:00:14 -05:00 committed by Daniel Eklöf
parent e0f3703ae6
commit 21a8d832ce
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
8 changed files with 120 additions and 55 deletions

View file

@ -10,8 +10,15 @@ struct renderer;
struct renderer *render_init(struct fdm *fdm, struct wayland *wayl);
void render_destroy(struct renderer *renderer);
bool render_resize(struct terminal *term, int width, int height);
bool render_resize_force(struct terminal *term, int width, int height);
enum resize_options {
RESIZE_NORMAL = 0,
RESIZE_FORCE = 1 << 0,
RESIZE_BY_CELLS = 1 << 1,
RESIZE_KEEP_GRID = 1 << 2,
};
bool render_resize(
struct terminal *term, int width, int height, uint8_t resize_options);
void render_refresh(struct terminal *term);
void render_refresh_csd(struct terminal *term);