diff options
author | Christoph Lohmann <20h@r-36.net> | 2012-09-13 07:16:38 +0200 |
---|---|---|
committer | Christoph Lohmann <20h@r-36.net> | 2012-09-13 07:16:38 +0200 |
commit | 12516e2181fe550e6e04f098fa3a8c4da413e091 (patch) | |
tree | 11b1e68509f47c2f134a059b6324d30245da30e8 | |
parent | 81283df2114946d4dd9513588c821eb6ea0f3721 (diff) | |
download | st-12516e2181fe550e6e04f098fa3a8c4da413e091.tar.gz st-12516e2181fe550e6e04f098fa3a8c4da413e091.tar.bz2 |
Reset window title on terminal reset too.
-rw-r--r-- | st.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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); @@ -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; @@ -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); @@ -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(); |