diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-02-09 11:56:41 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-02-09 11:56:41 +0100 |
| commit | 9ee3e2b4faedcd9213d58901a157af86acef5bae (patch) | |
| tree | 5e08ac90252bb99fd954ee23bb9030195562bd75 /x.c | |
| parent | bcdcea60e7a8ac2cfee7846694589eeada74e621 (diff) | |
| parent | 4ef0cbd8b9371f37f7d02ef37b5378b879e6b8bf (diff) | |
| download | st-9ee3e2b4faedcd9213d58901a157af86acef5bae.tar.gz st-9ee3e2b4faedcd9213d58901a157af86acef5bae.tar.bz2 st-9ee3e2b4faedcd9213d58901a157af86acef5bae.zip | |
Merge branch 'master' of https://git.suckless.org/st
Diffstat (limited to 'x.c')
| -rw-r--r-- | x.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -94,7 +94,7 @@ typedef struct { Window win; Drawable buf; GlyphFontSpec *specbuf; /* font spec buffer used for rendering */ - Atom xembed, wmdeletewin, netwmname, netwmpid; + Atom xembed, wmdeletewin, netwmname, netwmiconname, netwmpid; struct { XIM xim; XIC xic; @@ -1291,6 +1291,7 @@ xinit(int cols, int rows) xw.xembed = XInternAtom(xw.dpy, "_XEMBED", False); xw.wmdeletewin = XInternAtom(xw.dpy, "WM_DELETE_WINDOW", False); xw.netwmname = XInternAtom(xw.dpy, "_NET_WM_NAME", False); + xw.netwmiconname = XInternAtom(xw.dpy, "_NET_WM_ICON_NAME", False); XSetWMProtocols(xw.dpy, xw.win, &xw.wmdeletewin, 1); xw.netwmpid = XInternAtom(xw.dpy, "_NET_WM_PID", False); @@ -1691,6 +1692,19 @@ xsetenv(void) } void +xseticontitle(char *p) +{ + XTextProperty prop; + DEFAULT(p, opt_title); + + Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle, + &prop); + XSetWMIconName(xw.dpy, xw.win, &prop); + XSetTextProperty(xw.dpy, xw.win, &prop, xw.netwmiconname); + XFree(prop.value); +} + +void xsettitle(char *p) { XTextProperty prop; |
