From a0072d60705b9764970d435ec59dfc5c53158748 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 26 Feb 2017 15:46:31 +0100 Subject: Also update window title for thumbnail windows (closes #280) --- src/winwidget.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/winwidget.c') diff --git a/src/winwidget.c b/src/winwidget.c index 707b060..6f64844 100644 --- a/src/winwidget.c +++ b/src/winwidget.c @@ -634,9 +634,14 @@ 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 && (current_file != NULL)) { - /* title might contain e.g. the zoom specifier -> rewrite */ - char *s = slideshow_create_name(FEH_FILE(current_file->data), winwid); + if (opt.title && (winwid->type != WIN_TYPE_THUMBNAIL_VIEWER) && + (winwid->file != NULL)) { + char *s = slideshow_create_name(FEH_FILE(winwid->file->data), winwid); + winwidget_rename(winwid, s); + free(s); + } else if (opt.thumb_title && (winwid->type == WIN_TYPE_THUMBNAIL_VIEWER) && + (winwid->file != NULL)) { + char *s = thumbnail_create_name(FEH_FILE(winwid->file->data), winwid); winwidget_rename(winwid, s); free(s); } -- cgit v1.2.3