瀏覽代碼

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.
master
Bert Münnich 6 年之前
父節點
當前提交
0bf3265430
共有 2 個檔案被更改,包括 0 行新增12 行删除
  1. +0
    -9
      main.c
  2. +0
    -3
      window.c

+ 0
- 9
main.c 查看文件

@@ -350,18 +350,9 @@ void bar_put(win_bar_t *bar, const char *fmt, ...)
void update_info(void) void update_info(void)
{ {
unsigned int i, fn, fw; unsigned int i, fn, fw;
char title[256];
const char * mark; const char * mark;
win_bar_t *l = &win.bar.l, *r = &win.bar.r; win_bar_t *l = &win.bar.l, *r = &win.bar.r;


/* update window title */
if (mode == MODE_THUMB) {
win_set_title(&win, "sxiv");
} else {
snprintf(title, sizeof(title), "sxiv - %s", files[fileidx].name);
win_set_title(&win, title);
}

/* update bar contents */ /* update bar contents */
if (win.bar.h == 0) if (win.bar.h == 0)
return; return;


+ 0
- 3
window.c 查看文件

@@ -464,9 +464,6 @@ void win_draw_rect(win_t *win, int x, int y, int w, int h, bool fill, int lw,


void win_set_title(win_t *win, const char *title) void win_set_title(win_t *win, const char *title)
{ {
if (title == NULL)
title = "sxiv";

XStoreName(win->env.dpy, win->xwin, title); XStoreName(win->env.dpy, win->xwin, title);
XSetIconName(win->env.dpy, win->xwin, title); XSetIconName(win->env.dpy, win->xwin, title);




Loading…
取消
儲存