]> git.armaanb.net Git - st.git/blobdiff - st.c
ST: Add WM_ICON_NAME property support
[st.git] / st.c
diff --git a/st.c b/st.c
index 76b7e0d4386e0e39693a51364893ed3cd125f785..ae7fa633233a8098a16f891b0010abeef61b11db 100644 (file)
--- a/st.c
+++ b/st.c
@@ -1844,6 +1844,7 @@ strhandle(void)
 {
        char *p = NULL, *dec;
        int j, narg, par;
+       static int winname = 0;
 
        term.esc &= ~(ESC_STR_END|ESC_STR);
        strparse();
@@ -1853,7 +1854,15 @@ strhandle(void)
        case ']': /* OSC -- Operating System Command */
                switch (par) {
                case 0:
+                       if (narg > 1) {
+                               xsettitle(strescseq.args[1]);
+                               xseticontitle(strescseq.args[1]);
+                       }
+                       return;
                case 1:
+                       if (narg > 1)
+                               xseticontitle(strescseq.args[1]);
+                       return;
                case 2:
                        if (narg > 1)
                                xsettitle(strescseq.args[1]);