tReset window title on terminal reset too. - st - [fork] customized build of st… | |
git clone git://src.adamsgaard.dk/st | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit fe2ba95b3d81127b98a5dc6fa0341a90beabd1a0 | |
parent 977c5d908903c4c300b02811382a9ab53ec73803 | |
Author: Christoph Lohmann <[email protected]> | |
Date: Thu, 13 Sep 2012 07:16:38 +0200 | |
Reset window title on terminal reset too. | |
Diffstat: | |
M st.c | 9 ++++++++- | |
1 file changed, 8 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/st.c b/st.c | |
t@@ -296,6 +296,7 @@ static void xcopy(void); | |
static void xdrawcursor(void); | |
static void xinit(void); | |
static void xloadcols(void); | |
+static void xresettitle(void); | |
static void xseturgency(int); | |
static void xsetsel(char*); | |
static void xresize(int, int); | |
t@@ -1684,6 +1685,7 @@ tputc(char *c) { | |
case 'c': /* RIS -- Reset to inital state */ | |
treset(); | |
term.esc = 0; | |
+ xresettitle(); | |
break; | |
case '=': /* DECPAM -- Application keypad */ | |
term.mode |= MODE_APPKEYPAD; | |
t@@ -2026,7 +2028,7 @@ xinit(void) { | |
xw.xembed = XInternAtom(xw.dpy, "_XEMBED", False); | |
- XStoreName(xw.dpy, xw.win, opt_title ? opt_title : "st"); | |
+ xresettitle(); | |
XMapWindow(xw.dpy, xw.win); | |
xhints(); | |
XSync(xw.dpy, 0); | |
t@@ -2123,6 +2125,11 @@ xdrawcursor(void) { | |
} | |
void | |
+xresettitle(void) { | |
+ XStoreName(xw.dpy, xw.win, opt_title ? opt_title : "st"); | |
+} | |
+ | |
+void | |
redraw(void) { | |
struct timespec tv = {0, REDRAW_TIMEOUT * 1000}; | |
tfulldirt(); |