[hackers] [st] Clear X window in tsetreset() || "Roberto E. Vargas Caballero"

From: <hg_AT_suckless.org>
Date: Mon, 24 Sep 2012 10:32:05 +0200 (CEST)

changeset: 324:6520428484cc
user: "Roberto E. Vargas Caballero" <k0ga_AT_shike2.com>
date: Mon Sep 24 10:26:50 2012 +0200
files: st.c
description:
Clear X window in tsetreset()
tsetreset() is called when it is necessary a full initialization of the
terminal, so it also should clean the full X window and not only the
terminal content. It is necessary change the order of the
initialization in main(), and put xinit before of tnew(), because tnew()
calls to tsetreset(), and this can cause a call to xreset() with
incorrect values.
---
 st.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff -r b9b4152ff76e -r 6520428484cc st.c
--- a/st.c	Mon Sep 24 10:24:36 2012 +0200
+++ b/st.c	Mon Sep 24 10:26:50 2012 +0200
_AT_@ -952,6 +952,7 @@
 		term.tabs[i] = 1;
 	term.top = 0, term.bot = term.row - 1;
 	term.mode = MODE_WRAP;
+	xclear(0, 0, xw.w, xw.h);
 	tclearregion(0, 0, term.col-1, term.row-1);
 }
 
_AT_@ -2433,9 +2434,9 @@
 
  run:
 	setlocale(LC_CTYPE, "");
+	xinit();
 	tnew(80, 24);
 	ttynew();
-	xinit();
 	selinit();
 	run();
 	return 0;
Received on Mon Sep 24 2012 - 10:32:05 CEST

This archive was generated by hypermail 2.3.0 : Mon Sep 24 2012 - 10:36:09 CEST