aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Lohmann <20h@r-36.net>2012-09-13 07:16:38 +0200
committerChristoph Lohmann <20h@r-36.net>2012-09-13 07:16:38 +0200
commitfe2ba95b3d81127b98a5dc6fa0341a90beabd1a0 (patch)
tree11b1e68509f47c2f134a059b6324d30245da30e8
parent977c5d908903c4c300b02811382a9ab53ec73803 (diff)
downloadst-fe2ba95b3d81127b98a5dc6fa0341a90beabd1a0.tar.gz
st-fe2ba95b3d81127b98a5dc6fa0341a90beabd1a0.zip
Reset window title on terminal reset too.
-rw-r--r--st.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/st.c b/st.c
index 0db81f4..fe2b922 100644
--- a/st.c
+++ b/st.c
@@ -296,6 +296,7 @@ static void xcopy(void);
296static void xdrawcursor(void); 296static void xdrawcursor(void);
297static void xinit(void); 297static void xinit(void);
298static void xloadcols(void); 298static void xloadcols(void);
299static void xresettitle(void);
299static void xseturgency(int); 300static void xseturgency(int);
300static void xsetsel(char*); 301static void xsetsel(char*);
301static void xresize(int, int); 302static void xresize(int, int);
@@ -1684,6 +1685,7 @@ tputc(char *c) {
1684 case 'c': /* RIS -- Reset to inital state */ 1685 case 'c': /* RIS -- Reset to inital state */
1685 treset(); 1686 treset();
1686 term.esc = 0; 1687 term.esc = 0;
1688 xresettitle();
1687 break; 1689 break;
1688 case '=': /* DECPAM -- Application keypad */ 1690 case '=': /* DECPAM -- Application keypad */
1689 term.mode |= MODE_APPKEYPAD; 1691 term.mode |= MODE_APPKEYPAD;
@@ -2026,7 +2028,7 @@ xinit(void) {
2026 2028
2027 xw.xembed = XInternAtom(xw.dpy, "_XEMBED", False); 2029 xw.xembed = XInternAtom(xw.dpy, "_XEMBED", False);
2028 2030
2029 XStoreName(xw.dpy, xw.win, opt_title ? opt_title : "st"); 2031 xresettitle();
2030 XMapWindow(xw.dpy, xw.win); 2032 XMapWindow(xw.dpy, xw.win);
2031 xhints(); 2033 xhints();
2032 XSync(xw.dpy, 0); 2034 XSync(xw.dpy, 0);
@@ -2123,6 +2125,11 @@ xdrawcursor(void) {
2123} 2125}
2124 2126
2125void 2127void
2128xresettitle(void) {
2129 XStoreName(xw.dpy, xw.win, opt_title ? opt_title : "st");
2130}
2131
2132void
2126redraw(void) { 2133redraw(void) {
2127 struct timespec tv = {0, REDRAW_TIMEOUT * 1000}; 2134 struct timespec tv = {0, REDRAW_TIMEOUT * 1000};
2128 tfulldirt(); 2135 tfulldirt();