Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Reset window title on terminal reset too.
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
19d0a86
..
fe2b922
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-296,6
+296,7
@@
static void xcopy(void);
static void xdrawcursor(void);
static void xinit(void);
static void xloadcols(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);
static void xseturgency(int);
static void xsetsel(char*);
static void xresize(int, int);
@@
-1171,6
+1172,7
@@
tsetattr(int *attr, int l) {
case 7:
term.c.attr.mode |= ATTR_REVERSE;
break;
case 7:
term.c.attr.mode |= ATTR_REVERSE;
break;
+ case 21:
case 22:
term.c.attr.mode &= ~ATTR_BOLD;
break;
case 22:
term.c.attr.mode &= ~ATTR_BOLD;
break;
@@
-1683,6
+1685,7
@@
tputc(char *c) {
case 'c': /* RIS -- Reset to inital state */
treset();
term.esc = 0;
case 'c': /* RIS -- Reset to inital state */
treset();
term.esc = 0;
+ xresettitle();
break;
case '=': /* DECPAM -- Application keypad */
term.mode |= MODE_APPKEYPAD;
break;
case '=': /* DECPAM -- Application keypad */
term.mode |= MODE_APPKEYPAD;
@@
-2025,7
+2028,7
@@
xinit(void) {
xw.xembed = XInternAtom(xw.dpy, "_XEMBED", False);
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);
XMapWindow(xw.dpy, xw.win);
xhints();
XSync(xw.dpy, 0);
@@
-2121,6
+2124,11
@@
xdrawcursor(void) {
xcopy();
}
xcopy();
}
+void
+xresettitle(void) {
+ XStoreName(xw.dpy, xw.win, opt_title ? opt_title : "st");
+}
+
void
redraw(void) {
struct timespec tv = {0, REDRAW_TIMEOUT * 1000};
void
redraw(void) {
struct timespec tv = {0, REDRAW_TIMEOUT * 1000};