diff options
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -72,8 +72,7 @@ void win_open(win_t *win) { XSelectInput(e->dpy, win->xwin, StructureNotifyMask | ExposureMask | KeyPressMask); - XStoreName(e->dpy, win->xwin, "sxiv"); - XSetIconName(e->dpy, win->xwin, "Sxiv"); + win_set_title(win, "sxiv"); if ((classhint = XAllocClassHint())) { classhint->res_name = "sxiv"; @@ -94,6 +93,17 @@ void win_close(win_t *win) { XCloseDisplay(win->env.dpy); } +void win_set_title(win_t *win, const char *title) { + if (!win) + return; + + if (!title) + title = "sxiv"; + + XStoreName(win->env.dpy, win->xwin, title); + XSetIconName(win->env.dpy, win->xwin, title); +} + int win_configure(win_t *win, XConfigureEvent *cev) { int changed; |