mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-06 13:29:48 -05:00
Snap terminal size to an integer number of character cells.
This commit is contained in:
parent
17809b1e43
commit
1584c57edc
4 changed files with 34 additions and 6 deletions
9
window.c
9
window.c
|
|
@ -190,6 +190,7 @@ event_handler(struct wl_display *display,
|
|||
uint32_t size, uint32_t *p, void *data)
|
||||
{
|
||||
struct window *window = data;
|
||||
struct rectangle rectangle;
|
||||
int location;
|
||||
int grip_size = 16;
|
||||
|
||||
|
|
@ -251,11 +252,15 @@ event_handler(struct wl_display *display,
|
|||
if (window->height < window->minimum_height)
|
||||
window->height = window->minimum_height;
|
||||
|
||||
window_get_child_rectangle(window, &rectangle);
|
||||
if (window->resize_handler)
|
||||
(*window->resize_handler)(window,
|
||||
window->width,
|
||||
window->height,
|
||||
&rectangle,
|
||||
window->user_data);
|
||||
|
||||
window->width = rectangle.width + 20;
|
||||
window->height = rectangle.height + 60;
|
||||
|
||||
break;
|
||||
}
|
||||
} else if (opcode == 1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue