projects
/
profile
/
ivi
/
weston.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
362b672
)
Add minimum size for terminal
author
Alexander Preisinger
<alexander.preisinger@gmail.com>
Mon, 18 Jun 2012 18:59:26 +0000
(20:59 +0200)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Mon, 18 Jun 2012 19:14:29 +0000
(15:14 -0400)
At the moment the terminal can a negativ size and resizing it can create
some artifacts.
clients/terminal.c
patch
|
blob
|
history
diff --git
a/clients/terminal.c
b/clients/terminal.c
index
4308875
..
7e1c741
100644
(file)
--- a/
clients/terminal.c
+++ b/
clients/terminal.c
@@
-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;