[hackers] [st] Clean windows display after resizing || "Roberto E. Vargas Caballero"

From: <hg_AT_suckless.org>
Date: Mon, 17 Sep 2012 22:46:40 +0200 (CEST)

changeset: 316:3f7da038d39b
user: "Roberto E. Vargas Caballero" <k0ga_AT_shike2.com>
date: Mon Sep 17 22:13:17 2012 +0200
files: st.c
description:
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(+)
diff -r 522c577a2962 -r 3f7da038d39b st.c
--- a/st.c	Mon Sep 17 22:13:09 2012 +0200
+++ b/st.c	Mon Sep 17 22:13:17 2012 +0200
_AT_@ -1839,6 +1839,9 @@
 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
Received on Mon Sep 17 2012 - 22:46:40 CEST

This archive was generated by hypermail 2.3.0 : Mon Sep 17 2012 - 22:48:08 CEST