Hello community, here is the log from the commit of package feh for openSUSE:Factory checked in at 2016-08-10 19:56:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/feh (Old) and /work/SRC/openSUSE:Factory/.feh.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "feh" Changes: -------- --- /work/SRC/openSUSE:Factory/feh/feh.changes 2016-05-30 09:56:26.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.feh.new/feh.changes 2016-08-10 19:56:13.000000000 +0200 @@ -1,0 +2,58 @@ +Wed Aug 10 08:31:58 UTC 2016 - [email protected] + +- update to 2.16.2 +- refreshed patches: + feh-2.12-fix_sighandler.patch + feh-fix_pointer_arithmetics.patch + feh-makefile_optflags.patch +- dropped patch: feh-no_date.patch +* Also support in-place editing for images loaded via libcurl or + imagemagick. Results will not be written back to disk in this case. +* Fix crash when trying to rotate a JPEG image without having + jpegtran / jpegexiforient installed +* Handle failing fork() calls gracefully +* Fix invalid key/button definitions mis-assigning keys/buttons to other + actions +* Add sort mode --sort dirname to sort images by directory instead + of by name. For example, where a normal recursive run will show images in + the order foo/a.jpg -> foo/bar/baz.jpg -> foo/fnord.jpg, a dirname sort + will result in foo/a.jpg -> foo/fnord.jpg -> foo/bar/baz.jpg (Patch by + Sung Pae) +* Add navigation keys next_dir (]) and prev_dir ([) to jump to the first + image of the nex/previous directory (Patch by Sung Pae) +* Fix toggle_filenames key displaying wrong file numbers in multiwindow + mode +* Rescale image when resizing a window and --scale-down or --geometry is + active. This largely fixes the --scale-down issues introduced in + 2.15. However, note that --scale-down still introduces a fixed window + size which will not be updated when changing images (as was the case in + feh < 2.15). This may or may not be fixed in the future. +* Fix --keep-zoom-vp not keeping the viewport x/y offsets (broken by 2.15) +* Fix w (size_to_image) key not updating window size when --scale-down + or --geometry is active +* Patch by William Woodruff: Add --insecure option to disable HTTPS + certificate checks +* Patch by guraga: Add --no-recursive option to disable recursive directory + expansion. Note that --no-recursive is the default behaviour of feh. + This option is mostly useful to override a --recursive set in a theme or + shell alias +* Patch by Richard Molitor: Improve --scale-down in tiling environments. + This fixes flickering when changing images at the cost of slightly + less apaptive scale-down behaviour: Window size changes are now only + processed when the active image is changed +* --action and --action[1..9] now support action titles + (e.g. --action '[some title]some-command %F'), which are displayed + instead of the specified shell command. Note that the title must not + start with a space. Titles starting with a space are treated as part of + of the command so that actions like '[ -L %F ] && foo' still work +* make test: Ignore results on arm and mips since they expose a bug in + Imlib2 1.4.7 and/or giflib 5.1.2. Note that due to this bug, feh may be + unable to display gif images. x86 and amd64 are also affected. + Again, see <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813729> + for more information +* -f / --filelist: Do not print useless error message when a correct + filelist file is specified +* -f / --filelist: Fix bug in "-" / "/dev/stdin" handling affecting feh + running in ksh and possibly other environments + +------------------------------------------------------------------- Old: ---- feh-2.14.tar.bz2 feh-2.14.tar.bz2.asc feh-no_date.patch New: ---- feh-2.16.2.tar.bz2 feh-2.16.2.tar.bz2.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ feh.spec ++++++ --- /var/tmp/diff_new_pack.qNfQ73/_old 2016-08-10 19:56:14.000000000 +0200 +++ /var/tmp/diff_new_pack.qNfQ73/_new 2016-08-10 19:56:14.000000000 +0200 @@ -17,7 +17,7 @@ Name: feh -Version: 2.14 +Version: 2.16.2 Release: 0 Summary: Fast and Lightweight Image Viewer License: MIT and LGPL-2.0+ @@ -33,8 +33,6 @@ Patch1: feh-makefile_optflags.patch # PATCH-FIX-UPSTREAM feh-fix_pointer_arithmetics.patch https://github.com/derf/feh/issues/69 [email protected] -- fix compiler warnings on casting pointers as ints Patch2: feh-fix_pointer_arithmetics.patch -# PATCH-FIX-OPENSUSE feh-no_date.patch - [email protected] -- avoid injecting the current date into the man page, which causes needless rebuilds -Patch4: feh-no_date.patch # PATCH-FIX-UPSTREAM feh-fix_sighandler.patch https://github.com/derf/feh/issues/70 [email protected] -- bad prototype for a sighandler_t and a funky unportable pointer cast Patch5: feh-2.12-fix_sighandler.patch BuildRequires: curl-devel @@ -60,7 +58,6 @@ %setup -q %patch1 -p1 %patch2 -p1 -%patch4 -p1 %patch5 -p1 cp %{SOURCE5} . ++++++ feh-2.12-fix_sighandler.patch ++++++ --- /var/tmp/diff_new_pack.qNfQ73/_old 2016-08-10 19:56:14.000000000 +0200 +++ /var/tmp/diff_new_pack.qNfQ73/_new 2016-08-10 19:56:14.000000000 +0200 @@ -4,9 +4,11 @@ src/wallpaper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---- a/src/wallpaper.c -+++ b/src/wallpaper.c -@@ -696,10 +696,10 @@ void enl_ipc_send(char *str) +Index: feh-2.16.2/src/wallpaper.c +=================================================================== +--- feh-2.16.2.orig/src/wallpaper.c ++++ feh-2.16.2/src/wallpaper.c +@@ -765,10 +765,10 @@ void enl_ipc_send(char *str) return; } ++++++ feh-2.14.tar.bz2 -> feh-2.16.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/ChangeLog new/feh-2.16.2/ChangeLog --- old/feh-2.14/ChangeLog 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/ChangeLog 2016-07-31 17:00:10.000000000 +0200 @@ -1,4 +1,97 @@ -Sun, 04 Oct 2015 10:01:20 +0200 +Sun, 31 Jul 2016 16:59:07 +0200 Daniel Friesel <[email protected]> + +* Release v2.16.2 + * Also support in-place editing for images loaded via libcurl or + imagemagick. Results will not be written back to disk in this case. + +Fri, 24 Jun 2016 00:31:56 +0200 Daniel Friesel <[email protected]> + +* Release v2.16.1 + * Fix crash when trying to rotate a JPEG image without having + jpegtran / jpegexiforient installed + * Handle failing fork() calls gracefully + +Thu, 09 Jun 2016 08:59:35 +0200 Daniel Friesel <[email protected]> + +* Release v2.16 + * Fix invalid key/button definitions mis-assigning keys/buttons to other + actions + * Add sort mode --sort dirname to sort images by directory instead + of by name. For example, where a normal recursive run will show images in + the order foo/a.jpg -> foo/bar/baz.jpg -> foo/fnord.jpg, a dirname sort + will result in foo/a.jpg -> foo/fnord.jpg -> foo/bar/baz.jpg (Patch by + Sung Pae) + * Add navigation keys next_dir (]) and prev_dir ([) to jump to the first + image of the nex/previous directory (Patch by Sung Pae) + +Fri, 27 May 2016 13:15:49 +0200 Daniel Friesel <[email protected]> + +* Release v2.15.4 + * Fix toggle_filenames key displaying wrong file numbers in multiwindow + mode + +Thu, 28 Apr 2016 11:41:04 +0200 Daniel Friesel <[email protected]> + +* Release v2.15.3 + * Rescale image when resizing a window and --scale-down or --geometry is + active. This largely fixes the --scale-down issues introduced in + 2.15. However, note that --scale-down still introduces a fixed window + size which will not be updated when changing images (as was the case in + feh < 2.15). This may or may not be fixed in the future. + +Sat, 16 Apr 2016 18:32:38 +0200 Daniel Frisel <[email protected]> + +* Release v2.15.2 + * Fix --keep-zoom-vp not keeping the viewport x/y offsets (broken by 2.15) + +Fri, 15 Apr 2016 10:18:37 +0200 Daniel Friesel <[email protected]> + +* Release v2.15.1 + * Fix w (size_to_image) key not updating window size when --scale-down + or --geometry is active + +Sat, 09 Apr 2016 20:42:23 +0200 Daniel Friesel <[email protected]> + +* Release v2.15 + * Patch by William Woodruff: Add --insecure option to disable HTTPS + certificate checks + * Patch by guraga: Add --no-recursive option to disable recursive directory + expansion. Note that --no-recursive is the default behaviour of feh. + This option is mostly useful to override a --recursive set in a theme or + shell alias + * Patch by Richard Molitor: Improve --scale-down in tiling environments. + This fixes flickering when changing images at the cost of slightly + less apaptive scale-down behaviour: Window size changes are now only + processed when the active image is changed + * --action and --action[1..9] now support action titles + (e.g. --action '[some title]some-command %F'), which are displayed + instead of the specified shell command. Note that the title must not + start with a space. Titles starting with a space are treated as part of + of the command so that actions like '[ -L %F ] && foo' still work + +Thu, 18 Feb 2016 20:40:19 +0100 Daniel Friesel <[email protected]> + +* Release v2.14.2 + * make test: Ignore results on arm and mips since they expose a bug in + Imlib2 1.4.7 and/or giflib 5.1.2. Note that due to this bug, feh may be + unable to display gif images. x86 and amd64 are also affected. + Again, see <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813729> + for more information + * -f / --filelist: Do not print useless error message when a correct + filelist file is specified + * -f / --filelist: Fix bug in "-" / "/dev/stdin" handling affecting feh + running in ksh and possibly other environments + +Thu, 04 Feb 2016 20:31:38 +0100 Daniel Friesel <[email protected]> + +* Release v2.14.1 + * Skip a small set of build tests on Debian and derivatives, since they + trigger a Debian/Imlib2 bug. See + <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=812657> and + <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813729> for more + information + +Sun, 04 Oct 2015 10:01:20 +0200 Daniel Friesel <[email protected]> * Release v2.14 * Add --xinerama-index option for background setting @@ -15,7 +108,7 @@ active xinerama screen by setting the XINERAMA_SCREEN environment variable -Sun, 24 May 2015 11:45:18 +0200 +Sun, 24 May 2015 11:45:18 +0200 Daniel Friesel <[email protected]> * Release v2.13.1 * Fix --scale-down breaking image centering in fullscreen mode diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/Makefile new/feh-2.16.2/Makefile --- old/feh-2.14/Makefile 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/Makefile 2016-07-31 17:00:10.000000000 +0200 @@ -12,7 +12,11 @@ @${MAKE} -C share/applications test: all - @PACKAGE=${PACKAGE} prove test/feh.t test/mandoc.t + @if ! uname -m | fgrep -q -e arm -e mips; then \ + PACKAGE=${PACKAGE} prove test/feh.t test/mandoc.t; \ + else \ + PACKAGE=${PACKAGE} prove test/feh.t test/mandoc.t || cat test/imlib2-bug-notice; \ + fi test-x11: all test/run-interactive @@ -97,6 +101,8 @@ cp src/deps.mk /tmp/feh-${VERSION}/src/deps.mk sed -i 's/^VERSION ?= .*$$/VERSION ?= ${VERSION}/' \ /tmp/feh-${VERSION}/config.mk + sed -i 's/^MAN_DATE ?= .*$$/MAN_DATE ?= ${MAN_DATE}/' \ + /tmp/feh-${VERSION}/config.mk tar -C /tmp -cjf ../feh-${VERSION}.tar.bz2 feh-${VERSION} rm -r /tmp/feh-${VERSION} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/README new/feh-2.16.2/README --- old/feh-2.14/README 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/README 2016-07-31 17:00:10.000000000 +0200 @@ -23,7 +23,7 @@ ----------- * jpegtran (supplied by the jpeg library, for lossless image rotation) - * convert (supplied by ImageMagick, can be used to load unsuppoted formats) + * convert (supplied by ImageMagick, can be used to load unsupported formats) Installation ------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/config.mk new/feh-2.16.2/config.mk --- old/feh-2.14/config.mk 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/config.mk 2016-07-31 17:00:10.000000000 +0200 @@ -1,5 +1,5 @@ PACKAGE ?= feh -VERSION ?= 2.14 +VERSION ?= 2.16.2 # Prefix for all installed files PREFIX ?= /usr/local @@ -64,6 +64,7 @@ MAN_EXIF = disabled endif +MAN_DATE ?= July 31, 2016 # Uncomment this to use dmalloc #CFLAGS += -DWITH_DMALLOC diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/man/Makefile new/feh-2.16.2/man/Makefile --- old/feh-2.14/man/Makefile 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/man/Makefile 2016-07-31 17:00:10.000000000 +0200 @@ -8,7 +8,7 @@ .pre.1: sed \ -e 's/\$$VERSION\$$/${VERSION}/g' \ - -e 's/\$$DATE\$$/'"$$(date '+%B %d, %Y')"/g \ + -e 's/\$$DATE\$$/${MAN_DATE}/g' \ -e 's/\$$MAN_CURL\$$/${MAN_CURL}/' \ -e 's/\$$MAN_DEBUG\$$/${MAN_DEBUG}/' \ -e 's/\$$MAN_EXIF\$$/${MAN_EXIF}/' \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/man/feh.pre new/feh-2.16.2/man/feh.pre --- old/feh-2.14/man/feh.pre 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/man/feh.pre 2016-07-31 17:00:10.000000000 +0200 @@ -136,7 +136,7 @@ . .Bl -tag -width indent . -.It Cm -A , --action Oo Ar flag Oc Ns Ar action +.It Cm -A , --action Oo Ar flag Oc Ns Oo [ Ar title ] Oc Ns Ar action . Specify a shell command as an action to perform on the image. In slideshow or multiwindow mode, the action will be run when the action_0 key is pressed, in @@ -151,18 +151,38 @@ is .Qq \&; , .Nm -will reload the current image instead of switching to the next one after +will reload the current image instead of switching to the next one +.Pq slideshow mode +or closing the window +.Pq multiwindow mode +after executing the action. . +If +.No [ Ar title ] +is specified +.Pq note the literal Qo \&[ Qc and Qo ] Qc , +.Cm --draw-actions +will display +.Ar title +instead of +.Ar action +in the action list. Note that +.Ar title +must not start with a space. If it does, the action is handled as if it did +not have a title. This special case exists for backwards compatibility reasons +and makes sure that actions like +.Qq \&[ -L %F \&] && foo +still work. +. +. .Pp . The action will be executed by /bin/sh. Use format specifiers to refer to -image info. See +image info, see .Sx FORMAT SPECIFIERS -for examples. E.g. -.Qq feh -A "mv ~/images/%n" * . -In slideshow mode, the next image will be shown after running the action, in -multiwindow mode, the window will be closed. +for details. Example usage: +.Qq feh -A Qo mv ~/images/%N Qc * . . .It Cm --action1 No .. Cm --action9 . @@ -321,8 +341,9 @@ Note that larger images will be zoomed out to fit, but you can see them at 1:1 by clicking the zoom button. . -Note that this option does not enforce the geometry, changing it by a tiling -WM or manually is still possible. +Also note that this option does not enforce the geometry, changing it by a tiling +WM or manually is still possible. After each resize, the resulting window size +is used as the new size limit. . .It Cm -Y , --hide-pointer . @@ -353,6 +374,10 @@ .Sx FORMAT SPECIFIERS . May contain newlines. . +Use +.Qq --index-info So Sc +to display thumbnails without any info text +. .Pp . Note: If you specify image-related formats @@ -392,6 +417,12 @@ .Qq Nm in the name. . +.It Cm --insecure +. +When viewing files with HTTPS, this option disables strict hostname and peer +checking. This allows images on sites with self-signed certificates to be +opened, but is no more secure than plain HTTP. +. .It Cm --keep-zoom-vp . When switching images, keep zoom and viewport settings @@ -506,6 +537,11 @@ Recursively expand any directories in the commandline arguments to the content of those directories, all the way down to the bottom level. . +.It Cm --no-recursive +. +Don't recursively expand any directories (enabled by default). +Useful to override theme options. +. .It Cm -R , --reload Ar int . Reload filelist and current image after @@ -531,7 +567,9 @@ .It Cm -. , --scale-down . Scale images to fit window geometry (defaults to screen size when no geometry -was specified). +was specified). Note that the window geometry is not updated when changing +images at the moment. This behaviour may change in the future. +. This option is ignored when in fullscreen mode. . .Pp @@ -562,10 +600,10 @@ . .It Cm -S , --sort Ar sort_type . -The file list may be sorted according to image parameters. Allowed sort -types are: name, filename, mtime, width, height, pixels, size, format. For sort -modes other than name, filename, or mtime, a preload run will be necessary, -causing a delay proportional to the number of images in the list. +The file list may be sorted according to image parameters. Allowed sort types +are: name, filename, dirname, mtime, width, height, pixels, size, format. For +sort modes other than name, filename, dirname, or mtime, a preload run will be +necessary, causing a delay proportional to the number of images in the list. . .Pp . @@ -1234,6 +1272,9 @@ .It w Bq size_to_image . Change window size to fit current image size +.Pq plus/minus zoom, if set . +In scale-down and fixed-geometry mode, this also updates the window size +limits. . .It x Bq close . @@ -1243,9 +1284,15 @@ . Jump to a random position in the current filelist . +.It \&[, \&] Bq prev_dir, next_dir +. +Jump to the first image of the previous or next sequence of images sharing +a directory name in the current filelist. Use --sort dirname if you would +like to ensure that all images in a directory are grouped together. +. .It < , > Bq orient_3 , orient_1 . -In place editing - rotate the images 90 degrees (counter)clockwise. +In place editing - rotate the image 90 degrees (counter)clockwise. The rotation is lossless, but may create artifacts in some image corners when used with JPEG images. Rotating in the reverse direction will make them go away. See @@ -1253,14 +1300,13 @@ for more about lossless JPEG rotation. . .Em Note: -jpegtran does not update EXIF orientation tags. However, .Nm -assumes that you use the feature to normalize image orientation and want it to -be displayed this way everywhere. After every rotation, it will unconditionally -set the EXIF orientation to 1 -.Pq Qq 0,0 is top left . -Should you need to reverse this, see -.Xr jpegexiforient 1 . +assumes that this feature is used to normalize image orientation. For JPEG +images, it will unconditionally set the EXIF orientation tag to 1 +.Pq Qq 0,0 is top left +after every rotation. See +.Xr jpegexiforient 1 +for details on how to change this flag. . .It _ Bq flip . @@ -1268,10 +1314,7 @@ . .It | Bq mirror . -In place editing - horizontal flip. -Again, see -.Xr jpegtran 1 -for more information. +In place editing - horizontal flip . .It 0 .. 9 Bq action_0 .. action_9 . @@ -1625,7 +1668,7 @@ . .It feh --action 'rm %F' -rl --max-dim 1000x800 . -Resursively remove all images with dimensions below or equal to 1000x800 pixels +Recursively remove all images with dimensions below or equal to 1000x800 pixels from the current directory. . .El @@ -1681,6 +1724,21 @@ . .Pp . +On systems with Imlib2 >= 1.4.7 and giflib >= 5.1.2, +.Nm +may be unable to load gif images. For affected mips, mipsel and arm devices, +gif support is completely broken, while on x86 / x86_64 gifs can usually +only be loaded if they are the first image in the filelist. +This appears to be an Imlib2 and/or giflib bug introduced in giflib 5.1.2. +See +.Aq https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813729 +for details. Workaround: Use +.Cm --magick-timeout 5 +.Pq or some other positive value +to load gifs with imagemagick instead, or downgrade giflib to 5.1.1. +. +.Pp +. Thumbnail mode is somewhat inefficient, and because of that not nearly as fast as it could be. . @@ -1723,7 +1781,7 @@ . Copyright (C) 1999, 2000 by Paul Duncan. Copyright (C) 1999, 2000 by Tom Gilbert (and various contributors). -Copyright (C) 2010-2014 by Daniel Friesel (and even more contributors). +Copyright (C) 2010-2016 by Daniel Friesel (and even more contributors). . .Pp . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/share/applications/feh.pre new/feh-2.16.2/share/applications/feh.pre --- old/feh-2.14/share/applications/feh.pre 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/share/applications/feh.pre 2016-07-31 17:00:10.000000000 +0200 @@ -1,5 +1,6 @@ [Desktop Entry] Name=Feh +Name[en_US]=feh GenericName=Image viewer GenericName[en_US]=Image viewer Comment=Fast Imlib2-based Image Viewer @@ -9,4 +10,4 @@ Icon=$IMAGEDIR$/feh.png Categories=Graphics;2DGraphics;Viewer; MimeType=image/bmp;image/gif;image/jpeg;image/jpg;image/pjpeg;image/png;image/tiff;image/x-bmp;image/x-pcx;image/x-png;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-tga;image/x-xbitmap; -Name[en_US]=feh +NoDisplay=true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/src/deps.mk new/feh-2.16.2/src/deps.mk --- old/feh-2.14/src/deps.mk 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/src/deps.mk 2016-07-31 17:00:10.000000000 +0200 @@ -59,4 +59,4 @@ options.h wallpaper.h winwidget.o: winwidget.c feh.h gib_hash.h gib_list.h gib_imlib.h \ gib_style.h structs.h menu.h utils.h getopt.h debug.h filelist.h \ - winwidget.h options.h + winwidget.h options.h events.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/src/events.c new/feh-2.16.2/src/events.c --- old/feh-2.14/src/events.c 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/src/events.c 2016-07-31 17:00:10.000000000 +0200 @@ -41,7 +41,6 @@ static void feh_event_handle_ButtonPress(XEvent * ev); static void feh_event_handle_ButtonRelease(XEvent * ev); -static void feh_event_handle_ConfigureNotify(XEvent * ev); static void feh_event_handle_LeaveNotify(XEvent * ev); static void feh_event_handle_MotionNotify(XEvent * ev); static void feh_event_handle_ClientMessage(XEvent * ev); @@ -129,6 +128,7 @@ while (fgets(line, sizeof(line), conf)) { *action = '\0'; *button = '\0'; + cur_bb = NULL; read = sscanf(line, "%31s %7s\n", (char *) &action, (char *) &button); @@ -416,7 +416,7 @@ return; } -static void feh_event_handle_ConfigureNotify(XEvent * ev) +void feh_event_handle_ConfigureNotify(XEvent * ev) { while (XCheckTypedWindowEvent(disp, ev->xconfigure.window, ConfigureNotify, ev)); if (!menu_root) { @@ -639,7 +639,7 @@ winwid->im_h = gib_imlib_image_get_height(temp); gib_imlib_free_image_and_decache(temp); if (!winwid->full_screen && !opt.geom_flags) - winwidget_resize(winwid, winwid->im_w, winwid->im_h); + winwidget_resize(winwid, winwid->im_w, winwid->im_h, 0); winwid->has_rotated = 1; } winwid->im_angle = (ev->xmotion.x - winwid->w / 2) / ((double) winwid->w / 2) * 3.1415926535; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/src/events.h new/feh-2.16.2/src/events.h --- old/feh-2.14/src/events.h 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/src/events.h 2016-07-31 17:00:10.000000000 +0200 @@ -32,4 +32,6 @@ void feh_event_init(void); +void feh_event_handle_ConfigureNotify(XEvent * ev); + #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/src/feh.h new/feh-2.16.2/src/feh.h --- old/feh-2.14/src/feh.h 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/src/feh.h 2016-07-31 17:00:10.000000000 +0200 @@ -102,7 +102,9 @@ enum slide_change { SLIDE_NEXT, SLIDE_PREV, SLIDE_RAND, SLIDE_FIRST, SLIDE_LAST, SLIDE_JUMP_FWD, - SLIDE_JUMP_BACK + SLIDE_JUMP_BACK, + SLIDE_JUMP_NEXT_DIR, + SLIDE_JUMP_PREV_DIR }; enum image_bg { IMAGE_BG_CHECKS = 1, IMAGE_BG_BLACK, IMAGE_BG_WHITE }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/src/feh_png.c new/feh-2.16.2/src/feh_png.c --- old/feh-2.14/src/feh_png.c 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/src/feh_png.c 2016-07-31 17:00:10.000000000 +0200 @@ -115,12 +115,15 @@ return 0; png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); - if (!png_ptr) + if (!png_ptr) { + fclose(fp); return 0; + } info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) { png_destroy_write_struct(&png_ptr, (png_infopp) NULL); + fclose(fp); return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/src/filelist.c new/feh-2.16.2/src/filelist.c --- old/feh-2.14/src/filelist.c 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/src/filelist.c 2016-07-31 17:00:10.000000000 +0200 @@ -383,6 +383,20 @@ return(0); } +void feh_file_dirname(char *dst, feh_file * f, int maxlen) +{ + int n = strlen(f->filename) - strlen(f->name); + + /* Give up on long dirnames */ + if (n <= 0 || n >= maxlen) { + dst[0] = '\0'; + return; + } + + strncpy(dst, f->filename, n); + dst[n] = '\0'; +} + int feh_cmp_filename(void *file1, void *file2) { return(strcmp(FEH_FILE(file1)->filename, FEH_FILE(file2)->filename)); @@ -393,6 +407,17 @@ return(strcmp(FEH_FILE(file1)->name, FEH_FILE(file2)->name)); } +int feh_cmp_dirname(void *file1, void *file2) +{ + char dir1[PATH_MAX], dir2[PATH_MAX]; + int cmp; + feh_file_dirname(dir1, FEH_FILE(file1), PATH_MAX); + feh_file_dirname(dir2, FEH_FILE(file2), PATH_MAX); + if ((cmp = strcmp(dir1, dir2)) != 0) + return(cmp); + return(feh_cmp_name(file1, file2)); +} + /* Return -1 if file1 is _newer_ than file2 */ int feh_cmp_mtime(void *file1, void *file2) { @@ -465,6 +490,9 @@ case SORT_FILENAME: filelist = gib_list_sort(filelist, feh_cmp_filename); break; + case SORT_DIRNAME: + filelist = gib_list_sort(filelist, feh_cmp_dirname); + break; case SORT_MTIME: filelist = gib_list_sort(filelist, feh_cmp_mtime); break; @@ -523,6 +551,7 @@ FILE *fp; gib_list *list = NULL; char s[1024], s1[1024]; + Imlib_Load_Error err = IMLIB_LOAD_ERROR_NONE; Imlib_Image tmp_im; struct stat st; signed short tmp_magick_timeout; @@ -535,17 +564,26 @@ */ tmp_magick_timeout = opt.magick_timeout; opt.magick_timeout = -1; - if (!stat(filename, &st) && S_ISREG(st.st_mode) && - feh_load_image_char(&tmp_im, filename)) { - weprintf("Filelist file %s is an image, refusing to use it.\n" - "Did you mix up -f and -F?", filename); - opt.filelistfile = NULL; - return NULL; + if (!stat(filename, &st) && S_ISREG(st.st_mode)) { + tmp_im = imlib_load_image_with_error_return(filename, &err); + if (err == IMLIB_LOAD_ERROR_NONE) { + gib_imlib_free_image_and_decache(tmp_im); + weprintf("Filelist file %s is an image, refusing to use it.\n" + "Did you mix up -f and -F?", filename); + opt.filelistfile = NULL; + return NULL; + } } opt.magick_timeout = tmp_magick_timeout; errno = 0; - if ((fp = fopen(filename, "r")) == NULL) { + + if (!strcmp(filename, "/dev/stdin")) + fp = stdin; + else + fp = fopen(filename, "r"); + + if (fp == NULL) { /* return quietly, as it's okay to specify a filelist file that doesn't exist. In that case we create it on exit. */ return(NULL); @@ -561,7 +599,8 @@ /* Add it to the new list */ list = gib_list_add_front(list, feh_file_new(s1)); } - fclose(fp); + if (strcmp(filename, "/dev/stdin")) + fclose(fp); return(list); } @@ -584,7 +623,8 @@ /* I SHOULD be able to just use a simple realpath() here, but dumb * old Solaris's realpath doesn't return an absolute path if the path you give it is relative. Linux and BSD get this right... */ - getcwd(cwd, sizeof(cwd)); + if (getcwd(cwd, sizeof(cwd)) == NULL) + eprintf("Cannot determine working directory:"); snprintf(temp, sizeof(temp), "%s/%s", cwd, path); if (realpath(temp, fullpath) != NULL) { ret = estrdup(fullpath); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/src/filelist.h new/feh-2.16.2/src/filelist.h --- old/feh-2.14/src/filelist.h 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/src/filelist.h 2016-07-31 17:00:10.000000000 +0200 @@ -54,12 +54,29 @@ #define FEH_FILE(l) ((feh_file *) l) +/* + * PATH_MAX may not be defined on all systems. Since we only use it in for a + * getcwd call in feh_absolute_path, it isn't really worth the effort to malloc + * ever-increasing buffers until it fits. Instead, we just set it to 4096 and + * have --filelist and --bg-* hiccup if the path is larger. + */ +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif + enum filelist_recurse { FILELIST_FIRST, FILELIST_CONTINUE, FILELIST_LAST }; -enum sort_type { SORT_NONE, SORT_NAME, SORT_FILENAME, SORT_MTIME, SORT_WIDTH, +enum sort_type { + SORT_NONE, + SORT_NAME, + SORT_FILENAME, + SORT_DIRNAME, + SORT_MTIME, + SORT_WIDTH, SORT_HEIGHT, SORT_PIXELS, - SORT_SIZE, SORT_FORMAT + SORT_SIZE, + SORT_FORMAT }; feh_file *feh_file_new(char *filename); @@ -73,6 +90,7 @@ void delete_rm_files(void); gib_list *feh_file_info_preload(gib_list * list); int feh_file_info_load(feh_file * file, Imlib_Image im); +void feh_file_dirname(char *dst, feh_file * f, int maxlen); void feh_prepare_filelist(void); int feh_write_filelist(gib_list * list, char *filename); gib_list *feh_read_filelist(char *filename); @@ -81,6 +99,7 @@ void feh_save_filelist(); int feh_cmp_name(void *file1, void *file2); +int feh_cmp_dirname(void *file1, void *file2); int feh_cmp_filename(void *file1, void *file2); int feh_cmp_mtime(void *file1, void *file2); int feh_cmp_width(void *file1, void *file2); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/src/help.raw new/feh-2.16.2/src/help.raw --- old/feh-2.14/src/help.raw 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/src/help.raw 2016-07-31 17:00:10.000000000 +0200 @@ -11,7 +11,9 @@ -q, --quiet Hide non-fatal errors. May be used with --verbose -T, --theme THEME Load options with name THEME -r, --recursive Recursively expand any directories in FILE to - the content of those directories. (Take it easy) + the content of those directories + --no-recursive Do not recursively expand directories + (this is the default) -z, --randomize Randomize the filelist --no-jump-on-resort Don't jump to the first image when the filelist is resorted @@ -38,6 +40,7 @@ --cycle-once Exit after one loop through the slideshow -R, --reload NUM Reload images after NUM seconds -k, --keep-http Keep local copies when viewing HTTP/FTP files + --insecure Disable peer/host verification when using HTTPS. -K, --caption-path PATH Path to caption directory, enables caption display -j, --output-dir With -k: Output directory for saved files -l, --list list mode: ls-style output with image information @@ -184,7 +187,7 @@ This program is free software, see the file COPYING for licensing info. Copyright Tom Gilbert (and various contributors) 1999-2003. -Copyright Daniel Friesel 2010-2014. +Copyright Daniel Friesel (and various contributors) 2010-2016. Homepage: http://feh.finalrewind.org Report bugs to <[email protected]> or #feh on irc.oftc.net. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/src/imlib.c new/feh-2.16.2/src/imlib.c --- old/feh-2.14/src/imlib.c 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/src/imlib.c 2016-07-31 17:00:10.000000000 +0200 @@ -312,7 +312,13 @@ snprintf(argv_fd, sizeof(argv_fd), "png:fd:%d", fd); - if ((childpid = fork()) == 0) { + if ((childpid = fork()) < 0) { + weprintf("%s: Can't load with imagemagick. Fork failed:", filename); + unlink(sfn); + free(sfn); + sfn = NULL; + } + else if (childpid == 0) { /* discard convert output */ devnull = open("/dev/null", O_WRONLY); @@ -326,7 +332,7 @@ setpgid(0, 0); execlp("convert", "convert", filename, argv_fd, NULL); - exit(1); + _exit(1); } else { alarm(opt.magick_timeout); @@ -394,7 +400,7 @@ if (strlen(tmpname) > (NAME_MAX-6)) tmpname[NAME_MAX-7] = '\0'; - + sfn = estrjoin("_", tmpname, "XXXXXX", NULL); free(tmpname); @@ -411,6 +417,10 @@ curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, ebuff); curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1L); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1); + if (opt.insecure_ssl) { + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); + } res = curl_easy_perform(curl); curl_easy_cleanup(curl); @@ -597,8 +607,12 @@ len = snprintf(NULL, 0, "%d of %d", gib_list_length(filelist), gib_list_length(filelist)) + 1; s = emalloc(len); - snprintf(s, len, "%d of %d", gib_list_num(filelist, current_file) + - 1, gib_list_length(filelist)); + if (w->file) + snprintf(s, len, "%d of %d", gib_list_num(filelist, w->file) + + 1, gib_list_length(filelist)); + else + snprintf(s, len, "%d of %d", gib_list_num(filelist, current_file) + + 1, gib_list_length(filelist)); gib_imlib_get_text_size(fn, s, NULL, &nw, NULL, IMLIB_TEXT_TO_RIGHT); @@ -631,7 +645,7 @@ return; } -#ifdef HAVE_LIBEXIF +#ifdef HAVE_LIBEXIF void feh_draw_exif(winwidget w) { static Imlib_Font fn = NULL; @@ -656,13 +670,13 @@ fn = feh_load_font(w); - if (buffer == NULL) + if (buffer == NULL) { snprintf(buffer, EXIF_MAX_DATA, "%s", estrdup("Failed to run exif command")); gib_imlib_get_text_size(fn, &buffer[0], NULL, &width, &height, IMLIB_TEXT_TO_RIGHT); no_lines = 1; } - else + else { while ( (no_lines < 128) && (pos < EXIF_MAX_DATA) ) @@ -688,9 +702,9 @@ pos++; break; } - + pos++; - pos2++; + pos2++; } gib_imlib_get_text_size(fn, info_line, NULL, &line_width, @@ -720,7 +734,7 @@ feh_imlib_image_fill_text_bg(im, width, height); - for (i = 0; i < no_lines; i++) + for (i = 0; i < no_lines; i++) { gib_imlib_text_draw(im, fn, NULL, 2, (i * line_height) + 2, info_buf[i], IMLIB_TEXT_TO_RIGHT, 0, 0, 0, 255); @@ -1007,28 +1021,29 @@ void feh_edit_inplace(winwidget w, int op) { - int ret; - Imlib_Image old; - Imlib_Load_Error err; + int tmp; + Imlib_Image old = NULL; + Imlib_Load_Error err = IMLIB_LOAD_ERROR_NONE; if (!w->file || !w->file->data || !FEH_FILE(w->file->data)->filename) return; - if (!strcmp(gib_imlib_image_format(w->im), "jpeg")) { + if (!strcmp(gib_imlib_image_format(w->im), "jpeg") && + !path_is_url(FEH_FILE(w->file->data)->filename)) { feh_edit_inplace_lossless(w, op); feh_reload_image(w, 1, 1); return; } - ret = feh_load_image(&old, FEH_FILE(w->file->data)); - if (ret) { - if (op == INPLACE_EDIT_FLIP) { - imlib_context_set_image(old); + old = imlib_load_image_with_error_return(FEH_FILE(w->file->data)->filename, &err); + + if ((old != NULL) && (err == IMLIB_LOAD_ERROR_NONE)) { + imlib_context_set_image(old); + if (op == INPLACE_EDIT_FLIP) imlib_image_flip_vertical(); - } else if (op == INPLACE_EDIT_MIRROR) { - imlib_context_set_image(old); + else if (op == INPLACE_EDIT_MIRROR) imlib_image_flip_horizontal(); - } else - gib_imlib_image_orientate(old, op); + else + imlib_image_orientate(op); gib_imlib_save_image_with_error_return(old, FEH_FILE(w->file->data)->filename, &err); gib_imlib_free_image(old); @@ -1037,7 +1052,23 @@ w, err); feh_reload_image(w, 1, 1); } else { - im_weprintf(w, "failed to load image from disk to edit it in place"); + /* + * Image was opened using curl/magick or has been deleted after + * opening it + */ + imlib_context_set_image(w->im); + if (op == INPLACE_EDIT_FLIP) + imlib_image_flip_vertical(); + else if (op == INPLACE_EDIT_MIRROR) + imlib_image_flip_horizontal(); + else { + imlib_image_orientate(op); + tmp = w->im_w; + FEH_FILE(w->file->data)->info->width = w->im_w = w->im_h; + FEH_FILE(w->file->data)->info->height = w->im_h = tmp; + } + im_weprintf(w, "unable to edit in place. Changes have not been saved."); + winwidget_render_image(w, 1, 0); } return; @@ -1165,15 +1196,16 @@ if ((pid = fork()) < 0) { im_weprintf(w, "lossless %s: fork failed:", op_name); - exit(1); + free(file_str); + return; } else if (pid == 0) { execlp("jpegtran", "jpegtran", "-copy", "all", op_op, op_value, "-outfile", file_str, file_str, NULL); - im_weprintf(w, "lossless %s: Is 'jpegtran' installed? Failed to exec:", op_name); - exit(1); + weprintf("lossless %s: Is 'jpegtran' installed? Failed to exec:", op_name); + _exit(1); } else { waitpid(pid, &status, 0); @@ -1189,8 +1221,7 @@ } } if ((pid = fork()) < 0) { - im_weprintf(w, "lossless %s: cannot fix rotation: fork:", op_name); - exit(1); + im_weprintf(w, "lossless %s: fork failed while updating EXIF tags:", op_name); } else if (pid == 0) { @@ -1199,8 +1230,8 @@ dup2(devnull, 1); execlp("jpegexiforient", "jpegexiforient", "-1", file_str, NULL); - im_weprintf(w, "lossless %s: Failed to exec jpegexiforient:", op_name); - exit(1); + weprintf("lossless %s: Failed to exec jpegexiforient:", op_name); + _exit(1); } else { waitpid(pid, &status, 0); @@ -1253,9 +1284,9 @@ for (i = 0; i < 10; i++) { if (opt.actions[i]) { - line = emalloc(strlen(opt.actions[i]) + 5); + line = emalloc(strlen(opt.action_titles[i]) + 5); strcpy(line, "0: "); - line = strcat(line, opt.actions[i]); + line = strcat(line, opt.action_titles[i]); gib_imlib_get_text_size(fn, line, NULL, &tw, &th, IMLIB_TEXT_TO_RIGHT); free(line); if (tw > max_tw) @@ -1285,13 +1316,13 @@ gib_imlib_text_draw(im, fn, NULL, 1, 1, "defined actions:", IMLIB_TEXT_TO_RIGHT, 255, 255, 255, 255); for (i = 0; i < 10; i++) { - if (opt.actions[i]) { + if (opt.action_titles[i]) { cur_action++; - line = emalloc(strlen(opt.actions[i]) + 5); + line = emalloc(strlen(opt.action_titles[i]) + 5); sprintf(index, "%d", i); strcpy(line, index); strcat(line, ": "); - strcat(line, opt.actions[i]); + strcat(line, opt.action_titles[i]); gib_imlib_text_draw(im, fn, NULL, 2, (cur_action * line_th) + 2, line, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/src/keyevents.c new/feh-2.16.2/src/keyevents.c --- old/feh-2.14/src/keyevents.c 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/src/keyevents.c 2016-07-31 17:00:10.000000000 +0200 @@ -110,6 +110,8 @@ feh_set_kb(&keys.next_img , 0, XK_Right , 0, XK_n , 0, XK_space); feh_set_kb(&keys.jump_back , 0, XK_Page_Up , 0, XK_KP_Page_Up, 0, 0); feh_set_kb(&keys.jump_fwd , 0, XK_Page_Down , 0, XK_KP_Page_Down,0,0); + feh_set_kb(&keys.prev_dir , 0, XK_bracketleft, 0, 0 , 0, 0); + feh_set_kb(&keys.next_dir , 0, XK_bracketright, 0, 0 , 0, 0); feh_set_kb(&keys.jump_random,0, XK_z , 0, 0 , 0, 0); feh_set_kb(&keys.quit , 0, XK_Escape , 0, XK_q , 0, 0); feh_set_kb(&keys.close , 0, XK_x , 0, 0 , 0, 0); @@ -178,6 +180,7 @@ *k1 = '\0'; *k2 = '\0'; *k3 = '\0'; + cur_kb = NULL; read = sscanf(line, "%31s %31s %31s %31s\n", (char *) &action, (char *) &k1, (char* ) &k2, (char *) &k3); @@ -221,6 +224,10 @@ cur_kb = &keys.jump_back; else if (!strcmp(action, "jump_fwd")) cur_kb = &keys.jump_fwd; + else if (!strcmp(action, "prev_dir")) + cur_kb = &keys.prev_dir; + else if (!strcmp(action, "next_dir")) + cur_kb = &keys.next_dir; else if (!strcmp(action, "jump_random")) cur_kb = &keys.jump_random; else if (!strcmp(action, "quit")) @@ -531,6 +538,14 @@ else if (winwid->type == WIN_TYPE_THUMBNAIL) feh_thumbnail_select_next(winwid, 10); } + else if (feh_is_kp(&keys.next_dir, keysym, state)) { + if (opt.slideshow) + slideshow_change_image(winwid, SLIDE_JUMP_NEXT_DIR, 1); + } + else if (feh_is_kp(&keys.prev_dir, keysym, state)) { + if (opt.slideshow) + slideshow_change_image(winwid, SLIDE_JUMP_PREV_DIR, 1); + } else if (feh_is_kp(&keys.quit, keysym, state)) { winwidget_destroy_all(); } @@ -612,14 +627,8 @@ } else if (feh_is_kp(&keys.zoom_default, keysym, state)) { winwid->zoom = 1.0; - /* --scale-down will revert our operation if old_zoom == 1.0 */ - if (opt.scale_down) - winwid->old_zoom = 1.001; winwidget_center_image(winwid); winwidget_render_image(winwid, 0, 0); - /* --scale-down will also do weird stuff if zoom is 1.0 */ - if (opt.scale_down) - winwid->zoom = 1.001; } else if (feh_is_kp(&keys.zoom_fit, keysym, state)) { feh_calc_needed_zoom(&winwid->zoom, winwid->im_w, winwid->im_h, winwid->w, winwid->h); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/src/main.c new/feh-2.16.2/src/main.c --- old/feh-2.14/src/main.c 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/src/main.c 2016-07-31 17:00:10.000000000 +0200 @@ -193,6 +193,12 @@ { delete_rm_files(); + free(opt.menu_bg); + free(opt.menu_font); + + if(disp) + XCloseDisplay(disp); + if (opt.filelistfile) feh_write_filelist(filelist, opt.filelistfile); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/src/menu.c new/feh-2.16.2/src/menu.c --- old/feh-2.14/src/menu.c 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/src/menu.c 2016-07-31 17:00:10.000000000 +0200 @@ -49,14 +49,39 @@ void feh_menu_cb_opt_fullscreen(feh_menu * m, feh_menu_item * i); enum { - CB_CLOSE = 1, CB_EXIT, CB_RELOAD, CB_REMOVE, CB_DELETE, CB_RESET, - CB_REMOVE_THUMB, CB_DELETE_THUMB, CB_BG_TILED, CB_BG_SCALED, - CB_BG_CENTERED, CB_BG_FILLED, CB_BG_TILED_NOFILE, - CB_BG_SCALED_NOFILE, CB_BG_CENTERED_NOFILE, CB_BG_FILLED_NOFILE, - CB_SORT_FILENAME, CB_SORT_IMAGENAME, CB_SORT_FILESIZE, CB_SORT_RANDOMIZE, - CB_SAVE_IMAGE, CB_SAVE_FILELIST, CB_FIT, CB_OPT_DRAW_FILENAME, - CB_OPT_DRAW_ACTIONS, CB_OPT_KEEP_HTTP, CB_OPT_FREEZE_WINDOW, - CB_OPT_FULLSCREEN, CB_EDIT_ROTATE, CB_OPT_AUTO_ZOOM, CB_OPT_KEEP_ZOOM_VP + CB_CLOSE = 1, + CB_EXIT, + CB_RELOAD, + CB_REMOVE, + CB_DELETE, + CB_RESET, + CB_REMOVE_THUMB, + CB_DELETE_THUMB, + CB_BG_TILED, + CB_BG_SCALED, + CB_BG_CENTERED, + CB_BG_FILLED, + CB_BG_TILED_NOFILE, + CB_BG_SCALED_NOFILE, + CB_BG_CENTERED_NOFILE, + CB_BG_FILLED_NOFILE, + CB_SORT_FILENAME, + CB_SORT_IMAGENAME, + CB_SORT_DIRNAME, + CB_SORT_MTIME, + CB_SORT_FILESIZE, + CB_SORT_RANDOMIZE, + CB_SAVE_IMAGE, + CB_SAVE_FILELIST, + CB_FIT, + CB_OPT_DRAW_FILENAME, + CB_OPT_DRAW_ACTIONS, + CB_OPT_KEEP_HTTP, + CB_OPT_FREEZE_WINDOW, + CB_OPT_FULLSCREEN, + CB_EDIT_ROTATE, + CB_OPT_AUTO_ZOOM, + CB_OPT_KEEP_ZOOM_VP }; feh_menu *feh_menu_new(void) @@ -914,7 +939,7 @@ opt.menu_fn = gib_imlib_load_font(opt.menu_font); if (!opt.menu_fn) eprintf - ("couldn't load menu font %s, did you make install?\nAre you specifying a nonexistant font?\nDid you tell feh where to find it with --fontpath?", + ("couldn't load menu font %s, did you make install?\nAre you specifying a nonexistent font?\nDid you tell feh where to find it with --fontpath?", opt.menu_font); } @@ -923,7 +948,9 @@ feh_menu_add_entry(m, "By File Name", NULL, CB_SORT_FILENAME, 0, NULL); feh_menu_add_entry(m, "By Image Name", NULL, CB_SORT_IMAGENAME, 0, NULL); - if (opt.preload || (opt.sort > SORT_FILENAME)) + feh_menu_add_entry(m, "By Directory Name", NULL, CB_SORT_DIRNAME, 0, NULL); + feh_menu_add_entry(m, "By Modification Date", NULL, CB_SORT_MTIME, 0, NULL); + if (opt.preload || (opt.sort > SORT_MTIME)) feh_menu_add_entry(m, "By File Size", NULL, CB_SORT_FILESIZE, 0, NULL); feh_menu_add_entry(m, "Randomize", NULL, CB_SORT_RANDOMIZE, 0, NULL); @@ -1218,7 +1245,7 @@ if (m->fehwin->has_rotated) { m->fehwin->im_w = gib_imlib_image_get_width(m->fehwin->im); m->fehwin->im_h = gib_imlib_image_get_height(m->fehwin->im); - winwidget_resize(m->fehwin, m->fehwin->im_w, m->fehwin->im_h); + winwidget_resize(m->fehwin, m->fehwin->im_w, m->fehwin->im_h, 0); } winwidget_reset_image(m->fehwin); winwidget_render_image(m->fehwin, 1, 0); @@ -1251,6 +1278,18 @@ if (opt.jump_on_resort) { slideshow_change_image(m->fehwin, SLIDE_FIRST, 1); } + break; + case CB_SORT_DIRNAME: + filelist = gib_list_sort(filelist, feh_cmp_dirname); + if (opt.jump_on_resort) { + slideshow_change_image(m->fehwin, SLIDE_FIRST, 1); + } + break; + case CB_SORT_MTIME: + filelist = gib_list_sort(filelist, feh_cmp_mtime); + if (opt.jump_on_resort) { + slideshow_change_image(m->fehwin, SLIDE_FIRST, 1); + } break; case CB_SORT_FILESIZE: filelist = gib_list_sort(filelist, feh_cmp_size); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/src/options.c new/feh-2.16.2/src/options.c --- old/feh-2.14/src/options.c 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/src/options.c 2016-07-31 17:00:10.000000000 +0200 @@ -406,7 +406,8 @@ {"keep-zoom-vp" , 0, 0, 237}, {"scroll-step" , 1, 0, 238}, {"xinerama-index", 1, 0, 239}, - + {"insecure" , 0, 0, 240}, + {"no-recursive" , 0, 0, 241}, {0, 0, 0, 0} }; int optch = 0, cmdx = 0; @@ -513,6 +514,8 @@ opt.sort = SORT_NAME; else if (!strcasecmp(optarg, "filename")) opt.sort = SORT_FILENAME; + else if (!strcasecmp(optarg, "dirname")) + opt.sort = SORT_DIRNAME; else if (!strcasecmp(optarg, "mtime")) opt.sort = SORT_MTIME; else if (!strcasecmp(optarg, "width")) @@ -759,6 +762,10 @@ case 239: opt.xinerama_index = atoi(optarg); break; + case 240: + opt.insecure_ssl = 1; + case 241: + opt.recursive = 0; default: break; } @@ -785,10 +792,21 @@ static void check_options(void) { int i; + char *endptr; + for (i = 0; i < 10; i++) { if (opt.actions[i] && !opt.hold_actions[i] && (opt.actions[i][0] == ';')) { opt.hold_actions[i] = 1; - opt.actions[i] = &opt.actions[i][1]; + opt.actions[i] = opt.actions[i] + 1; + } + opt.action_titles[i] = opt.actions[i]; + if (opt.actions[i] && (opt.actions[i][0] == '[')) { + if (((endptr = strchr(opt.actions[i], ']')) != NULL) + && (opt.actions[i][1] != ' ')) { + opt.action_titles[i] = opt.actions[i] + 1; + opt.actions[i] = endptr + 1; + *endptr = 0; + } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/src/options.h new/feh-2.16.2/src/options.h --- old/feh-2.14/src/options.h 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/src/options.h 2016-07-31 17:00:10.000000000 +0200 @@ -73,6 +73,7 @@ unsigned char image_bg; unsigned char no_fehbg; unsigned char keep_zoom_vp; + unsigned char insecure_ssl; char *output_file; char *output_dir; @@ -82,6 +83,7 @@ char *title; char *thumb_title; char *actions[10]; + char *action_titles[10]; char *fontpath; char *filelistfile; char *menu_font; @@ -151,6 +153,8 @@ struct __fehkey jump_back; struct __fehkey quit; struct __fehkey jump_fwd; + struct __fehkey prev_dir; + struct __fehkey next_dir; struct __fehkey remove; struct __fehkey delete; struct __fehkey jump_first; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/src/slideshow.c new/feh-2.16.2/src/slideshow.c --- old/feh-2.14/src/slideshow.c 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/src/slideshow.c 2016-07-31 17:00:10.000000000 +0200 @@ -322,6 +322,44 @@ try the previous file, not another jmp */ change = SLIDE_NEXT; break; + case SLIDE_JUMP_NEXT_DIR: + { + char old_dir[PATH_MAX], new_dir[PATH_MAX]; + int j; + + feh_file_dirname(old_dir, FEH_FILE(current_file->data), PATH_MAX); + + for (j = 0; j < our_filelist_len; j++) { + current_file = feh_list_jump(filelist, current_file, FORWARD, 1); + feh_file_dirname(new_dir, FEH_FILE(current_file->data), PATH_MAX); + if (strcmp(old_dir, new_dir) != 0) + break; + } + } + change = SLIDE_NEXT; + break; + case SLIDE_JUMP_PREV_DIR: + { + char old_dir[PATH_MAX], new_dir[PATH_MAX]; + int j; + + /* Start the search from the previous file in case we are on + the first file of a directory */ + current_file = feh_list_jump(filelist, current_file, BACK, 1); + feh_file_dirname(old_dir, FEH_FILE(current_file->data), PATH_MAX); + + for (j = 0; j < our_filelist_len; j++) { + current_file = feh_list_jump(filelist, current_file, BACK, 1); + feh_file_dirname(new_dir, FEH_FILE(current_file->data), PATH_MAX); + if (strcmp(old_dir, new_dir) != 0) + break; + } + + /* Next file is the first entry of prev_dir */ + current_file = feh_list_jump(filelist, current_file, FORWARD, 1); + } + change = SLIDE_NEXT; + break; default: eprintf("BUG!\n"); break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/src/wallpaper.c new/feh-2.16.2/src/wallpaper.c --- old/feh-2.14/src/wallpaper.c 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/src/wallpaper.c 2016-07-31 17:00:10.000000000 +0200 @@ -292,7 +292,7 @@ Atom prop_root, prop_esetroot, type; int format, i; unsigned long length, after; - unsigned char *data_root, *data_esetroot; + unsigned char *data_root = NULL, *data_esetroot = NULL; Pixmap pmap_d1, pmap_d2; gib_list *l; @@ -550,6 +550,13 @@ } } } + + if (data_root) + XFree(data_root); + + if (data_esetroot) + XFree(data_esetroot); + /* This will locate the property, creating it if it doesn't exist */ prop_root = XInternAtom(disp2, "_XROOTPMAP_ID", False); prop_esetroot = XInternAtom(disp2, "ESETROOT_PMAP_ID", False); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/src/winwidget.c new/feh-2.16.2/src/winwidget.c --- old/feh-2.14/src/winwidget.c 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/src/winwidget.c 2016-07-31 17:00:10.000000000 +0200 @@ -28,6 +28,7 @@ #include "filelist.h" #include "winwidget.h" #include "options.h" +#include "events.h" static void winwidget_unregister(winwidget win); static void winwidget_register(winwidget win); @@ -297,6 +298,13 @@ XSetCommand(disp, ret->win, cmdargv, cmdargc); winwidget_register(ret); + + /* do not scale down a thumbnail list window, only those created from it */ + if (opt.scale_down && (ret->type != WIN_TYPE_THUMBNAIL)) { + opt.geom_w = w; + opt.geom_h = h; + opt.geom_flags |= WidthValue | HeightValue; + } return; } @@ -393,7 +401,7 @@ int need_center = winwid->had_resize; if (!winwid->full_screen && resize) { - winwidget_resize(winwid, winwid->im_w, winwid->im_h); + winwidget_resize(winwid, winwid->im_w, winwid->im_h, 0); winwidget_reset_image(winwid); } @@ -408,28 +416,6 @@ winwidget_setup_pixmaps(winwid); - if (!winwid->full_screen && opt.scale_down && - (winwid->type != WIN_TYPE_THUMBNAIL) && - (winwid->old_zoom == 1.0)) { - int max_w = winwid->w, max_h = winwid->h; - if (opt.geom_flags & WidthValue) { - max_w = opt.geom_w; - } - if (opt.geom_flags & HeightValue) { - max_h = opt.geom_h; - } - D(("max: %dx%d, size: %dx%d\n", max_w, max_h, winwid->im_w, winwid->im_h)); - if (max_w < winwid->im_w || max_h < winwid->im_h) { - D(("scaling down image %dx%d\n", max_w, max_h)); - - feh_calc_needed_zoom(&(winwid->zoom), winwid->im_w, winwid->im_h, - max_w, max_h); - if (resize) - winwidget_resize(winwid, winwid->im_w * winwid->zoom, winwid->im_h * winwid->zoom); - D(("after scaling down image %dx%d\n", winwid->w, winwid->h)); - } - } - if (!winwid->full_screen && ((gib_imlib_image_has_alpha(winwid->im)) || (opt.geom_flags & (WidthValue | HeightValue)) || (winwid->im_x || winwid->im_y) || (winwid->zoom != 1.0) @@ -438,13 +424,22 @@ feh_draw_checks(winwid); if (!winwid->full_screen && opt.zoom_mode - && (winwid->zoom == 1.0) && ! (opt.geom_flags & (WidthValue | HeightValue)) - && (winwid->w > winwid->im_w) && (winwid->h > winwid->im_h)) + && (winwid->zoom == 1.0) && ! (opt.geom_flags & (WidthValue | HeightValue)) + && (winwid->w > winwid->im_w) && (winwid->h > winwid->im_h)) + feh_calc_needed_zoom(&(winwid->zoom), winwid->im_w, winwid->im_h, winwid->w, winwid->h); + + /* + * In case of a resize, the geomflags (and im_w, im_h) get updated by + * the ConfigureNotify handler. + */ + if (need_center && !winwid->full_screen + && (opt.geom_flags & (WidthValue | HeightValue)) + && ((winwid->w < winwid->im_w) || (winwid->h < winwid->im_h))) feh_calc_needed_zoom(&(winwid->zoom), winwid->im_w, winwid->im_h, winwid->w, winwid->h); if (resize && (winwid->full_screen - || (!opt.scale_down && (opt.geom_flags & (WidthValue | HeightValue))))) { + || (opt.geom_flags & (WidthValue | HeightValue)))) { int smaller; /* Is the image smaller than screen? */ int max_w = 0, max_h = 0; @@ -532,8 +527,8 @@ winwid->im_y = (int) (max_h - (winwid->im_h * winwid->zoom)) >> 1; } } - else if (need_center && !winwid->full_screen && opt.scale_down - && (winwid->type != WIN_TYPE_THUMBNAIL)) { + else if (need_center && !winwid->full_screen + && (winwid->type != WIN_TYPE_THUMBNAIL) && !opt.keep_zoom_vp) { winwid->im_x = (int) (winwid->w - (winwid->im_w * winwid->zoom)) >> 1; winwid->im_y = (int) (winwid->h - (winwid->im_h * winwid->zoom)) >> 1; } @@ -776,6 +771,15 @@ /* wait for the window to map */ D(("Waiting for window to map\n")); XMaskEvent(disp, StructureNotifyMask, &ev); + /* Unfortunately, StructureNotifyMask does not only mask + * the events of type MapNotify (which we want to mask here) + * but also such of type ConfigureNotify (and others, see + * https://tronche.com/gui/x/xlib/events/processing-overview.html), + * which should be handled, especially on tiling wm's. To + * remedy this, the handler is executed explicitly: + */ + if (ev.type == ConfigureNotify) + feh_event_handle_ConfigureNotify(&ev); D(("Window mapped\n")); winwid->visible = 1; } @@ -797,7 +801,7 @@ return; } -void winwidget_resize(winwidget winwid, int w, int h) +void winwidget_resize(winwidget winwid, int w, int h, int force_resize) { XWindowAttributes attributes; int tc_x, tc_y, px, py; @@ -838,7 +842,7 @@ D((" x %d y %d w %d h %d\n", attributes.x, attributes.y, winwid->w, winwid->h)); - if (!opt.scale_down && opt.geom_flags & (WidthValue | HeightValue)) { + if ((opt.geom_flags & (WidthValue | HeightValue)) && !force_resize) { winwid->had_resize = 1; return; } @@ -862,6 +866,12 @@ winwid->had_resize = 1; XFlush(disp); + if (force_resize && (opt.geom_flags & (WidthValue | HeightValue)) + && (winwid->type != WIN_TYPE_THUMBNAIL)) { + opt.geom_w = winwid->w; + opt.geom_h = winwid->h; + } + D(("-> x %d y %d w %d h %d\n", winwid->x, winwid->y, winwid->w, winwid->h)); @@ -1051,7 +1061,7 @@ void winwidget_size_to_image(winwidget winwid) { - winwidget_resize(winwid, winwid->im_w * winwid->zoom, winwid->im_h * winwid->zoom); + winwidget_resize(winwid, winwid->im_w * winwid->zoom, winwid->im_h * winwid->zoom, 1); winwid->im_x = winwid->im_y = 0; winwidget_render_image(winwid, 0, 0); return; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/src/winwidget.h new/feh-2.16.2/src/winwidget.h --- old/feh-2.14/src/winwidget.h 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/src/winwidget.h 2016-07-31 17:00:10.000000000 +0200 @@ -128,7 +128,7 @@ void winwidget_render_image(winwidget winwid, int resize, int force_alias); void winwidget_rotate_image(winwidget winid, double angle); void winwidget_move(winwidget winwid, int x, int y); -void winwidget_resize(winwidget winwid, int w, int h); +void winwidget_resize(winwidget winwid, int w, int h, int force_resize); void winwidget_setup_pixmaps(winwidget winwid); void winwidget_update_title(winwidget ret); void winwidget_update_caption(winwidget winwid); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/test/feh.t new/feh-2.16.2/test/feh.t --- old/feh-2.14/test/feh.t 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/test/feh.t 2016-07-31 17:00:10.000000000 +0200 @@ -115,8 +115,13 @@ cmd => "$feh --list --recursive --sort filename test/ok" ); $cmd->exit_is_num(0); -$cmd->stdout_is_file('test/list/filename_recursive'); -$cmd->stderr_is_eq(''); + +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813729 +#$cmd->stdout_is_file('test/list/filename_recursive'); +#$cmd->stderr_is_eq(''); +# dummy tests to match number of planned tests +$cmd->exit_is_num(0); +$cmd->exit_is_num(0); $cmd = Test::Command->new( cmd => "$feh --customlist '%f; %h; %l; %m; %n; %p; " . "%s; %t; %u; %w' $images" ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/test/imlib2-bug-notice new/feh-2.16.2/test/imlib2-bug-notice --- old/feh-2.14/test/imlib2-bug-notice 1970-01-01 01:00:00.000000000 +0100 +++ new/feh-2.16.2/test/imlib2-bug-notice 2016-07-31 17:00:10.000000000 +0200 @@ -0,0 +1,11 @@ +[!] Possibly broken imlib2 / libgif detected - ignoring test results + +Imlib2 1.4.7 with giflib 5.1.2 is unable to load GIF images. On x86 / x86_64 +this applies to most gifs which are not the first file in the filelist, while +on mips/mipsel and (some?) arm boxes it is unable to load any gif files. Since +feh's tests include gifs, they fail. + +As there's nothing we can do about it (and other image formats still work +fine), we'll just pretend everything's okay. + +See <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813729> for details. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.14/test/run-interactive new/feh-2.16.2/test/run-interactive --- old/feh-2.14/test/run-interactive 2015-10-04 10:03:43.000000000 +0200 +++ new/feh-2.16.2/test/run-interactive 2016-07-31 17:00:10.000000000 +0200 @@ -3,6 +3,8 @@ Xephyr -screen 500x500 :7 > /dev/null 2>&1 & pid=${!} +sleep 2 + DISPLAY=:7 prove -j1 test/feh-scr-i.t test/feh-i.t ret=${?} Files old/feh-2.14/test/scr/caption_done and new/feh-2.16.2/test/scr/caption_done differ Files old/feh-2.14/test/scr/caption_new and new/feh-2.16.2/test/scr/caption_new differ Files old/feh-2.14/test/scr/caption_while and new/feh-2.16.2/test/scr/caption_while differ Files old/feh-2.14/test/scr/draw_action and new/feh-2.16.2/test/scr/draw_action differ Files old/feh-2.14/test/scr/draw_action_tinted and new/feh-2.16.2/test/scr/draw_action_tinted differ Files old/feh-2.14/test/scr/draw_all_multi and new/feh-2.16.2/test/scr/draw_all_multi differ Files old/feh-2.14/test/scr/draw_all_one and new/feh-2.16.2/test/scr/draw_all_one differ Files old/feh-2.14/test/scr/draw_filename and new/feh-2.16.2/test/scr/draw_filename differ Files old/feh-2.14/test/scr/draw_filename_action and new/feh-2.16.2/test/scr/draw_filename_action differ Files old/feh-2.14/test/scr/draw_filename_action_tinted and new/feh-2.16.2/test/scr/draw_filename_action_tinted differ Files old/feh-2.14/test/scr/draw_filename_tinted and new/feh-2.16.2/test/scr/draw_filename_tinted differ Files old/feh-2.14/test/scr/draw_info and new/feh-2.16.2/test/scr/draw_info differ Files old/feh-2.14/test/scr/draw_info_tinted and new/feh-2.16.2/test/scr/draw_info_tinted differ Files old/feh-2.14/test/scr/feh_scaledown_lwi and new/feh-2.16.2/test/scr/feh_scaledown_lwi differ Files old/feh-2.14/test/scr/index_full_h400 and new/feh-2.16.2/test/scr/index_full_h400 differ Files old/feh-2.14/test/scr/index_full_w400 and new/feh-2.16.2/test/scr/index_full_w400 differ Files old/feh-2.14/test/scr/index_h400 and new/feh-2.16.2/test/scr/index_h400 differ Files old/feh-2.14/test/scr/index_w400 and new/feh-2.16.2/test/scr/index_w400 differ Files old/feh-2.14/test/scr/thumbnail_default and new/feh-2.16.2/test/scr/thumbnail_default differ ++++++ feh-fix_pointer_arithmetics.patch ++++++ --- /var/tmp/diff_new_pack.qNfQ73/_old 2016-08-10 19:56:15.000000000 +0200 +++ /var/tmp/diff_new_pack.qNfQ73/_new 2016-08-10 19:56:15.000000000 +0200 @@ -2,8 +2,10 @@ src/menu.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) ---- a/src/menu.c -+++ b/src/menu.c +Index: feh-2.16.2/src/menu.c +=================================================================== +--- feh-2.16.2.orig/src/menu.c ++++ feh-2.16.2/src/menu.c @@ -24,6 +24,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE */ @@ -13,7 +15,7 @@ #include "feh.h" #include "thumbnail.h" #include "wallpaper.h" -@@ -906,7 +908,8 @@ void feh_menu_init_main(void) +@@ -931,7 +933,8 @@ void feh_menu_init_main(void) void feh_menu_init_common() { @@ -23,7 +25,7 @@ char buf[30]; feh_menu *m; -@@ -950,7 +953,7 @@ void feh_menu_init_common() +@@ -977,7 +980,7 @@ void feh_menu_init_common() m = feh_menu_new(); m->name = estrdup("TILED"); for (i = 0; i < num_desks; i++) { @@ -32,7 +34,7 @@ if (opt.slideshow || opt.multiwindow) feh_menu_add_entry(m, buf, NULL, CB_BG_TILED, i, NULL); -@@ -962,7 +965,7 @@ void feh_menu_init_common() +@@ -989,7 +992,7 @@ void feh_menu_init_common() m = feh_menu_new(); m->name = estrdup("SCALED"); for (i = 0; i < num_desks; i++) { @@ -41,7 +43,7 @@ if (opt.slideshow || opt.multiwindow) feh_menu_add_entry(m, buf, NULL, CB_BG_SCALED, -@@ -975,7 +978,7 @@ void feh_menu_init_common() +@@ -1002,7 +1005,7 @@ void feh_menu_init_common() m = feh_menu_new(); m->name = estrdup("CENTERED"); for (i = 0; i < num_desks; i++) { @@ -50,7 +52,7 @@ if (opt.slideshow || opt.multiwindow) feh_menu_add_entry(m, buf, NULL, CB_BG_CENTERED, i, NULL); -@@ -987,7 +990,7 @@ void feh_menu_init_common() +@@ -1014,7 +1017,7 @@ void feh_menu_init_common() m = feh_menu_new(); m->name = estrdup("FILLED"); for (i = 0; i < num_desks; i++) { ++++++ feh-makefile_optflags.patch ++++++ --- /var/tmp/diff_new_pack.qNfQ73/_old 2016-08-10 19:56:15.000000000 +0200 +++ /var/tmp/diff_new_pack.qNfQ73/_new 2016-08-10 19:56:15.000000000 +0200 @@ -3,8 +3,10 @@ src/Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) ---- a/config.mk -+++ b/config.mk +Index: feh-2.16.2/config.mk +=================================================================== +--- feh-2.16.2.orig/config.mk ++++ feh-2.16.2/config.mk @@ -15,8 +15,8 @@ example_dir = ${main_dir}/share/doc/feh/ desktop_dir = ${main_dir}/share/applications @@ -16,8 +18,10 @@ cam ?= 0 curl ?= 1 ---- a/src/Makefile -+++ b/src/Makefile +Index: feh-2.16.2/src/Makefile +=================================================================== +--- feh-2.16.2.orig/src/Makefile ++++ feh-2.16.2/src/Makefile @@ -7,7 +7,7 @@ I_SRCS = ${shell echo *.raw} I_DSTS = ${I_SRCS:.raw=.inc}
