aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto E. Vargas Caballero <k0ga@shike2.com>2012-09-17 22:13:17 +0200
committerRoberto E. Vargas Caballero <k0ga@shike2.com>2012-09-17 22:13:17 +0200
commit4876d6e05b6c1b17b0c366f15ae72ae48f045068 (patch)
tree5eafbe936eed42684bf0ecf2c0c1a6757aed5344
parent88a8f85a8a6de56d23510cf6e7810d90478085a5 (diff)
downloadst-4876d6e05b6c1b17b0c366f15ae72ae48f045068.tar.gz
st-4876d6e05b6c1b17b0c366f15ae72ae48f045068.zip
Clean windows display after resizing
Some times the size after a resizing is not an exact multiply of a number of characters, so redrawn the screen using the lines and columns of the neww size can cause that some old graphics keep in the screen. Solution is clean all the windows with the background color. --- st.c | 3 +++ 1 file changed, 3 insertions(+)
-rw-r--r--st.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/st.c b/st.c
index b2e5e22..20e4512 100644
--- a/st.c
+++ b/st.c
@@ -1839,6 +1839,9 @@ void
1839xresize(int col, int row) { 1839xresize(int col, int row) {
1840 xw.w = MAX(1, 2*BORDER + col * xw.cw); 1840 xw.w = MAX(1, 2*BORDER + col * xw.cw);
1841 xw.h = MAX(1, 2*BORDER + row * xw.ch); 1841 xw.h = MAX(1, 2*BORDER + row * xw.ch);
1842 XFillRectangle(xw.dpy, xw.buf, dc.gc, 0, 0,
1843 DisplayWidth(xw.dpy, xw.scr),
1844 DisplayHeight(xw.dpy, xw.scr));
1842} 1845}
1843 1846
1844void 1847void