[hackers] [st] Reset window title on terminal reset too. || Christoph Lohmann

From: <hg_AT_suckless.org>
Date: Thu, 13 Sep 2012 23:23:47 +0200 (CEST)

changeset: 299:476e36000b9e
user: Christoph Lohmann <20h_AT_r-36.net>
date: Thu Sep 13 07:16:38 2012 +0200
files: st.c
description:
Reset window title on terminal reset too.


diff -r 32e739db7ea3 -r 476e36000b9e st.c
--- a/st.c Thu Sep 13 07:04:59 2012 +0200
+++ b/st.c Thu Sep 13 07:16:38 2012 +0200
_AT_@ -296,6 +296,7 @@
 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);
_AT_@ -1684,6 +1685,7 @@
                         case 'c': /* RIS -- Reset to inital state */
                                 treset();
                                 term.esc = 0;
+ xresettitle();
                                 break;
                         case '=': /* DECPAM -- Application keypad */
                                 term.mode |= MODE_APPKEYPAD;
_AT_@ -2026,7 +2028,7 @@
 
         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);
_AT_@ -2123,6 +2125,11 @@
 }
 
 void
+xresettitle(void) {
+ XStoreName(xw.dpy, xw.win, opt_title ? opt_title : "st");
+}
+
+void
 redraw(void) {
         struct timespec tv = {0, REDRAW_TIMEOUT * 1000};
         tfulldirt();
Received on Thu Sep 13 2012 - 23:23:47 CEST

This archive was generated by hypermail 2.3.0 : Thu Sep 13 2012 - 23:24:07 CEST