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.
+0 −12
2 files changed
| @@ -350,18 +350,9 @@ void bar_put(win_bar_t *bar, const char *fmt, ...) | |||
| 350 | 350 | void update_info(void) | |
| 351 | 351 | { | |
| 352 | 352 | unsigned int i, fn, fw; | |
| 353 | − | char title[256]; | |
| 354 | 353 | const char * mark; | |
| 355 | 354 | win_bar_t *l = &win.bar.l, *r = &win.bar.r; | |
| 356 | 355 | ||
| 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 | − | ||
| 365 | 356 | /* update bar contents */ | |
| 366 | 357 | if (win.bar.h == 0) | |
| 367 | 358 | return; | |
| @@ -464,9 +464,6 @@ void win_draw_rect(win_t *win, int x, int y, int w, int h, bool fill, int lw, | |||
| 464 | 464 | ||
| 465 | 465 | void win_set_title(win_t *win, const char *title) | |
| 466 | 466 | { | |
| 467 | − | if (title == NULL) | |
| 468 | − | title = "sxiv"; | |
| 469 | − | ||
| 470 | 467 | XStoreName(win->env.dpy, win->xwin, title); | |
| 471 | 468 | XSetIconName(win->env.dpy, win->xwin, title); | |
| 472 | 469 | ||