mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-10-15 16:28:13 +00:00
Add minimum size for terminal
At the moment the terminal can a negativ size and resizing it can create some artifacts.
This commit is contained in:
parent
362b672111
commit
e2b88c093a
|
@ -772,6 +772,12 @@ resize_handler(struct widget *widget,
|
|||
struct terminal *terminal = data;
|
||||
int32_t columns, rows, m;
|
||||
|
||||
if (width < 200)
|
||||
width = 200;
|
||||
|
||||
if (height < 50)
|
||||
height = 50;
|
||||
|
||||
m = 2 * terminal->margin;
|
||||
columns = (width - m) / (int32_t) terminal->extents.max_x_advance;
|
||||
rows = (height - m) / (int32_t) terminal->extents.height;
|
||||
|
|
Loading…
Reference in a new issue