Clear X window in tsetreset()

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Wed, 19 Sep 2012 19:42:48 +0200

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 --git a/st.c b/st.c
index 35f6f16..7c05a6c 100644
--- a/st.c
+++ b/st.c
_AT_@ -943,6 +943,7 @@ treset(void) {
 		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_@ -2445,9 +2446,9 @@ main(int argc, char *argv[]) {
 
  run:
 	setlocale(LC_CTYPE, "");
+	xinit();
 	tnew(80, 24);
 	ttynew();
-	xinit();
 	selinit();
 	run();
 	return 0;
-- 
1.7.10.4
--r5Pyd7+fXNt84Ff3
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment; filename="0002-Remove-unused-parameters-in-ttyresize.patch"
Received on Mon Sep 17 2001 - 00:00:00 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 19 2012 - 20:48:04 CEST