summaryrefslogtreecommitdiff
path: root/src/winwidget.c
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2017-01-11 20:56:04 +0100
committerDaniel Friesel <derf@finalrewind.org>2017-01-11 20:56:04 +0100
commit44d33fc2a05415cf20af360ee9f8bffd0d40460d (patch)
tree1dc32333b98afebd9faa86be1cf23e6f52f28645 /src/winwidget.c
parent6c604f263291de6b44db6f5703271ddd229b4fa9 (diff)
rewrite window title whenever the image is rendered (closes #266)
Diffstat (limited to 'src/winwidget.c')
-rw-r--r--src/winwidget.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/winwidget.c b/src/winwidget.c
index 758183b..e92f1c3 100644
--- a/src/winwidget.c
+++ b/src/winwidget.c
@@ -634,6 +634,12 @@ void winwidget_render_image(winwidget winwid, int resize, int force_alias)
feh_draw_info(winwid);
if (winwid->errstr)
feh_draw_errstr(winwid);
+ if (opt.title) {
+ /* title might contain e.g. the zoom specifier -> rewrite */
+ char *s = slideshow_create_name(FEH_FILE(current_file->data), winwid);
+ winwidget_rename(winwid, s);
+ free(s);
+ }
} else if ((opt.mode == MODE_ZOOM) && !antialias)
feh_draw_zoom(winwid);