JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Clean windows display after resizing
authorRoberto E. Vargas Caballero <k0ga@shike2.com>
Mon, 17 Sep 2012 20:13:17 +0000 (22:13 +0200)
committerRoberto E. Vargas Caballero <k0ga@shike2.com>
Mon, 17 Sep 2012 20:13:17 +0000 (22:13 +0200)
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(+)

st.c

diff --git a/st.c b/st.c
index b2e5e22..20e4512 100644 (file)
--- a/st.c
+++ b/st.c
@@ -1839,6 +1839,9 @@ void
 xresize(int col, int row) {
        xw.w = MAX(1, 2*BORDER + col * xw.cw);
        xw.h = MAX(1, 2*BORDER + row * xw.ch);
+       XFillRectangle(xw.dpy, xw.buf, dc.gc, 0, 0,
+                      DisplayWidth(xw.dpy, xw.scr),
+                      DisplayHeight(xw.dpy, xw.scr));
 }
 
 void