diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-02-14 22:35:06 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2018-02-14 22:35:06 +0100 |
commit | 14a9702bb2365e51a6f8854f85a13b6e5cf4001c (patch) | |
tree | 6a6c396f017f4e4c10794d74e3550481be580477 /src/filelist.c | |
parent | 4abbd21f698945a662ed57e2dad6b6b25de9e474 (diff) | |
parent | 5e75b5ef3e7d0270913c04645398bc3596c2a90a (diff) |
Merge branch 'ulteq-dimension-pruning-without-preload'
Diffstat (limited to 'src/filelist.c')
-rw-r--r-- | src/filelist.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/filelist.c b/src/filelist.c index b569b8a..9a4af27 100644 --- a/src/filelist.c +++ b/src/filelist.c @@ -464,9 +464,17 @@ int feh_cmp_format(void *file1, void *file2) void feh_prepare_filelist(void) { - if (opt.list || opt.customlist || (opt.sort > SORT_MTIME) - || opt.preload || opt.min_width || opt.min_height - || (opt.max_width != UINT_MAX) || (opt.max_height != UINT_MAX)) { + /* + * list and customlist mode as well as the somewhat more fancy sort modes + * need access to file infos. Preloading them is also useful for + * list/customlist as --min-dimension/--max-dimension may filter images + * which should not be processed. + * Finally, if --min-dimension/--max-dimension (-> opt.filter_by_dimensions) + * is set and we're in thumbnail mode, we need to filter images first so + * we can create a properly sized thumbnail list. + */ + if (opt.list || opt.preload || opt.customlist || (opt.sort > SORT_MTIME) + || (opt.filter_by_dimensions && (opt.index || opt.collage || opt.thumbs || opt.bgmode))) { /* For these sort options, we have to preload images */ filelist = feh_file_info_preload(filelist); if (!gib_list_length(filelist)) |