Krolyxon
Commit 0bf3265

Branches

Refs →

nsxiv0bf3265

Set window title only once at startup

Putting image info in the title predates the info bar; it no longer seems
necessary.

Fixes issue #318.
Author
Bert Münnich
Date
2018-10-15 15:29 +0200
Parent
971f5d6
Commit
0bf32654307d285eaf7b538db40548202a6b5596

+0 −12

2 files changed

  1. M main.c +0 −9
  2. M window.c +0 −3
M main.c View
@@ -350,18 +350,9 @@ void bar_put(win_bar_t *bar, const char *fmt, ...)
350350 void update_info(void)
351351 {
352352 unsigned int i, fn, fw;
353− char title[256];
354353 const char * mark;
355354 win_bar_t *l = &win.bar.l, *r = &win.bar.r;
356355
357− /* update window title */
358− if (mode == MODE_THUMB) {
359− win_set_title(&win, "sxiv");
360− } else {
361− snprintf(title, sizeof(title), "sxiv - %s", files[fileidx].name);
362− win_set_title(&win, title);
363− }
364−
365356 /* update bar contents */
366357 if (win.bar.h == 0)
367358 return;
M window.c View
@@ -464,9 +464,6 @@ void win_draw_rect(win_t *win, int x, int y, int w, int h, bool fill, int lw,
464464
465465 void win_set_title(win_t *win, const char *title)
466466 {
467− if (title == NULL)
468− title = "sxiv";
469−
470467 XStoreName(win->env.dpy, win->xwin, title);
471468 XSetIconName(win->env.dpy, win->xwin, title);
472469