Hello community,

here is the log from the commit of package feh for openSUSE:Factory checked in 
at 2018-03-08 10:59:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/feh (Old)
 and      /work/SRC/openSUSE:Factory/.feh.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "feh"

Thu Mar  8 10:59:30 2018 rev:22 rq:584030 version:2.25

Changes:
--------
--- /work/SRC/openSUSE:Factory/feh/feh.changes  2018-02-27 17:00:04.291459824 
+0100
+++ /work/SRC/openSUSE:Factory/.feh.new/feh.changes     2018-03-08 
10:59:41.084596439 +0100
@@ -1,0 +2,15 @@
+Wed Mar  7 10:14:18 UTC 2018 - mvet...@suse.com
+
+- Update to 2.25
+  * Add --version-sort option to enable natural sorting of file
+    and directory names
+  * Allow arbitrary X11 colors as -B/--image-bg argument
+  * Improve --image-bg support and transparency handling in
+    --bg-* mode
+  * Respect --geometry settings in --bg-fill mode
+  * Add keybinding toggle_auto_zoom (default "Z") to toggle
+    --auto-zoom
+  * Fix filelists specified by -f/--filelist not being reloaded 
+    when using --reload
+
+-------------------------------------------------------------------

Old:
----
  feh-2.24.tar.bz2
  feh-2.24.tar.bz2.asc

New:
----
  feh-2.25.tar.bz2
  feh-2.25.tar.bz2.asc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ feh.spec ++++++
--- /var/tmp/diff_new_pack.xhEGPg/_old  2018-03-08 10:59:41.804570416 +0100
+++ /var/tmp/diff_new_pack.xhEGPg/_new  2018-03-08 10:59:41.804570416 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           feh
-Version:        2.24
+Version:        2.25
 Release:        0
 Summary:        X11 image viewer
 License:        MIT AND LGPL-2.0-or-later

++++++ feh-2.24.tar.bz2 -> feh-2.25.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.24/ChangeLog new/feh-2.25/ChangeLog
--- old/feh-2.24/ChangeLog      2018-02-26 21:48:39.000000000 +0100
+++ new/feh-2.25/ChangeLog      2018-03-04 08:55:59.000000000 +0100
@@ -1,3 +1,18 @@
+Sun, 04 Mar 2018 08:53:50 +0100  Daniel Friesel <derf+...@finalrewind.org>
+
+* Release v2.25
+    * Add --version-sort option to enable natural sorting of file and directory
+      names. This requires a libc with strverscmp support, which is a
+      non-POSIX GNU extension. Use the new build flag `verscmp=0` to disable
+      this feature on systems which do not ship strverscmp
+      (patch by ulteq)
+    * Allow arbitrary X11 colors as -B/--image-bg argument (patch by ulteq)
+    * Improve --image-bg support and transparency handling in --bg-* mode
+    * Respect --geometry settings in --bg-fill mode
+    * Add keybinding toggle_auto_zoom (default "Z") to toggle --auto-zoom
+    * Fix filelists specified by -f/--filelist not being reloaded when using
+      --reload
+
 Mon, 26 Feb 2018 21:41:38 +0100  Daniel Friesel <derf+...@finalrewind.org>
 
 * Release v2.24
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.24/Makefile new/feh-2.25/Makefile
--- old/feh-2.24/Makefile       2018-02-26 21:48:39.000000000 +0100
+++ new/feh-2.25/Makefile       2018-03-04 08:55:59.000000000 +0100
@@ -65,12 +65,14 @@
 install-font:
        @echo installing fonts to ${font_dir}
        @mkdir -p ${font_dir}
+       @chmod 755 ${font_dir}
        @cp share/fonts/* ${font_dir}
        @chmod 644 ${font_dir}/*
 
 install-img:
        @echo installing images to ${image_dir}
        @mkdir -p ${image_dir}
+       @chmod 755 ${image_dir}
        @cp share/images/* ${image_dir}
        @chmod 644 ${image_dir}/*
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.24/README.md new/feh-2.25/README.md
--- old/feh-2.24/README.md      2018-02-26 21:48:39.000000000 +0100
+++ new/feh-2.25/README.md      2018-03-04 08:55:59.000000000 +0100
@@ -83,6 +83,7 @@
 | exif | 0 | Builtin EXIF tag display support |
 | help | 0 | include help text (refers to the manpage otherwise) |
 | stat64 | 0 | Support CIFS shares from 64bit hosts on 32bit machines |
+| verscmp | 1 | Support naturing sorting (`--version-sort`). Requires a 
GNU-compatible libc exposing `strverscmp` |
 | xinerama | 1 | Support Xinerama/XRandR multiscreen setups |
 
 So, by default **libcurl** and **Xinerama** are enabled, the rest is disabled.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.24/config.mk new/feh-2.25/config.mk
--- old/feh-2.24/config.mk      2018-02-26 21:48:39.000000000 +0100
+++ new/feh-2.25/config.mk      2018-03-04 08:55:59.000000000 +0100
@@ -1,13 +1,14 @@
 PACKAGE ?= feh
-VERSION ?= 2.24
+VERSION ?= 2.25
 
 app ?= 0
 cam ?= 0
 curl ?= 1
 debug ?= 0
+exif ?= 0
 help ?= 0
+verscmp ?= 1
 xinerama ?= 1
-exif ?= 0
 
 # Prefix for all installed files
 PREFIX ?= /usr/local
@@ -63,6 +64,13 @@
        CFLAGS += -D_FILE_OFFSET_BITS=64
 endif
 
+ifeq (${verscmp},1)
+       CFLAGS += -DHAVE_VERSCMP
+       MAN_VERSCMP = enabled
+else
+       MAN_VERSCMP = disabled
+endif
+
 ifeq (${xinerama},1)
        CFLAGS += -DHAVE_LIBXINERAMA
        LDLIBS += -lXinerama
@@ -79,7 +87,7 @@
        MAN_EXIF = disabled
 endif
 
-MAN_DATE ?= February 26, 2018
+MAN_DATE ?= March 04, 2018
 
 # Uncomment this to use dmalloc
 #CFLAGS += -DWITH_DMALLOC
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.24/man/Makefile new/feh-2.25/man/Makefile
--- old/feh-2.24/man/Makefile   2018-02-26 21:48:39.000000000 +0100
+++ new/feh-2.25/man/Makefile   2018-03-04 08:55:59.000000000 +0100
@@ -12,6 +12,7 @@
        -e 's/\$$MAN_CURL\$$/${MAN_CURL}/' \
        -e 's/\$$MAN_DEBUG\$$/${MAN_DEBUG}/' \
        -e 's/\$$MAN_EXIF\$$/${MAN_EXIF}/' \
+       -e 's/\$$MAN_VERSCMP\$$/${MAN_VERSCMP}/' \
        -e 's/\$$MAN_XINERAMA\$$/${MAN_XINERAMA}/' \
        < ${@:.1=.pre} > $@
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.24/man/feh.pre new/feh-2.25/man/feh.pre
--- old/feh-2.24/man/feh.pre    2018-02-26 21:48:39.000000000 +0100
+++ new/feh-2.25/man/feh.pre    2018-03-04 08:55:59.000000000 +0100
@@ -24,7 +24,8 @@
 .
 .Pp
 .
-Compile-time switches: libcurl support $MAN_CURL$, Xinerama support
+Compile-time switches: libcurl support $MAN_CURL$, natural sorting support
+$MAN_VERSCMP$, Xinerama support
 $MAN_XINERAMA$, builtin EXIF support $MAN_EXIF$$MAN_DEBUG$
 .
 .
@@ -194,7 +195,7 @@
 .
 .It Cm --auto-rotate
 .
-.Pq only if compiled with exif=1
+.Pq optional feature, $MAN_EXIF$ in this build
 Automatically rotate images based on EXIF data. Does not alter the image files.
 .
 .It Cm -Z , --auto-zoom
@@ -253,7 +254,7 @@
 .
 .It Cm --draw-exif
 .
-.Pq only if compiled with exif=1
+.Pq optional feature, $MAN_EXIF$ in this build
 display some EXIF information in the bottom left corner, similar to using
 .Cm --info
 with exiv2 / exifgrep .
@@ -378,10 +379,16 @@
 .
 .It Cm -B , --image-bg Ar style
 .
-Use style as background for transparent image parts and the like.
-Accepted values: checks, white, black.
-.
-The default for windowed mode is checks, while fullscreen defaults to black.
+Use
+.Ar style
+as background for transparent image parts and the like.
+Accepted values: default, checks, or an XColor
+.Pq eg. Qo black Qc or Qo #428bdd Qc .
+.
+In windowed mode, the default is checks
+.Pq a checkered background so transparent image parts are easy to see .
+In fullscreen and background setting mode, checks is not accepted and the
+default is black.
 .
 .It Cm -i , --index
 .
@@ -508,8 +515,8 @@
 .
 .It Cm --no-xinerama
 .
-Disable Xinerama support.  Only makes sense when you have Xinerama support
-compiled in.
+.Pq optional feature, $MAN_XINERAMA$ in this build
+Disable Xinerama support.
 .
 .It Cm -j , --output-dir Ar directory
 .
@@ -690,8 +697,18 @@
 .
 output version information and exit.
 .
+.It Cm --version-sort
+.
+.Pq optional feature, $MAN_VERSCMP$ in this build
+Use natural sorting for file and directory names. In this mode, filenames are
+sorted as an ordinary human would expect, e.g.
+.Qq 2.jpg
+comes before
+.Qq 10.jpg .
+.
 .It Cm --xinerama-index Ar screen
 .
+.Pq optional feature, $MAN_XINERAMA$ in this build
 Override
 .Nm Ns No 's
 idea of the active Xinerama screen. May be useful in certain circumstances
@@ -815,31 +832,17 @@
 .
 Set thumbnail width.
 .
-.It Cm -J , --thumb-redraw Ar n
-.
-Only relevant for
-.Cm --thumbnails :
-Redraw thumbnail window every
-.Ar n
-images.  In
-.Nm
-<= 1.5, the thumbnail image used to be redrawn after every computed thumbnail
-.Pq so, it updated immediately .
-However, since the redrawing takes quite long
-.Pq especially for thumbnail mode on a large filelist ,
-this turned out to be a major performance penalty.
-As a workaround, the thumbnail image is redrawn every 10th image now by
-default. Set
-.Ar n No = 1
-to get the old behaviour,
-.Ar n No = 0
-will only redraw once all thumbnails are loaded.
-.
 .El
 .
 .
 .Sh INDEX AND THUMBNAIL MODE OPTIONS
 .
+In addition to
+.Sx MONTAGE MODE OPTIONS
+.Cm --alpha , --bg , --limit-height , --limit-width , --output , --output-only 
,
+.Cm --thumb-height , --thumb-width ,
+the following options can be used.
+.
 .Bl -tag -width indent
 .
 .It Cm --index-info Ar format
@@ -870,6 +873,25 @@
 .
 Set font to print a title on the index, if no font is specified, no title will
 be printed.
+.
+.It Cm -J , --thumb-redraw Ar n
+.
+Redraw thumbnail window every
+.Ar n
+images.  In
+.Nm
+<= 1.5, the thumbnail image used to be redrawn after every computed thumbnail
+.Pq so, it updated immediately .
+However, since the redrawing takes quite long
+.Pq especially for thumbnail mode on a large filelist ,
+this turned out to be a major performance penalty.
+As a workaround, the thumbnail image is redrawn every 10th image now by
+default. Set
+.Ar n No = 1
+to get the old behaviour,
+.Ar n No = 0
+will only redraw once all thumbnails are loaded.
+.
 .El
 .
 .
@@ -902,13 +924,13 @@
 .
 .Pp
 .
-For the
-.Cm --bg-center
+For
+.Cm --bg-center , --bg-fill ,
 and
-.Cm --bg-max
-options, you can use the
+.Cm --bg-max ,
+you can use
 .Cm --geometry
-option to specify an offset from one side of the screen instead of
+to specify an offset from one side of the screen instead of
 centering the image.  Positive values will offset from the left/top
 side, negative values from the bottom/right.  +0 and -0 are both
 valid and distinct values.
@@ -941,7 +963,8 @@
 .It Cm --bg-center
 .
 Center the file on the background.  If it is too small, it will be surrounded
-by a black border
+by a border as specified by
+.Cm --image-bg .
 .
 .It Cm --bg-fill
 .
@@ -954,7 +977,9 @@
 .
 Like
 .Cm --bg-fill ,
-but scale the image to the maximum size that fits the screen with black 
borders on one side.
+but scale the image to the maximum size that fits the screen with borders on 
one side.
+The border color can be set using
+.Cm --image-bg .
 .
 .It Cm --bg-scale
 .
@@ -1276,7 +1301,7 @@
 .
 .It e Bq toggle_exif
 .
-.Pq only if compiled with exif=1
+.Pq optional feature, $MAN_EXIF$ in this build
 Toggle EXIF tag display
 .
 .It f Bq save_filelist
@@ -1356,6 +1381,10 @@
 .
 Jump to a random position in the current filelist
 .
+.It Z Bq toggle_auto_zoom
+.
+Toggle auto-zoom.
+.
 .It \&[, \&] Bq prev_dir, next_dir
 .
 Jump to the first image of the previous or next sequence of images sharing
@@ -1689,10 +1718,14 @@
 .
 Recursively show all images found in ~/Pictures and subdirectories
 .
-.It feh -rSfilename ~/Pictures
+.It feh -rSfilename --version-sort ~/Pictures
 .
-Same as above, but sort by filename. By default, feh will show files in the
-order it finds them on the hard disk, which is usually somewhat random.
+Same as above, but sort naturally. By default, feh will show files in the
+string order of their names, meaning e.g.
+.Qq foo 10.jpg
+will come before
+.Qq foo 2.jpg .
+In this case, they are instead ordered as a human would expect.
 .
 .It feh -t -Sfilename -E 128 -y 128 -W 1024 ~/Pictures
 .
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.24/src/feh.h new/feh-2.25/src/feh.h
--- old/feh-2.24/src/feh.h      2018-02-26 21:48:39.000000000 +0100
+++ new/feh-2.25/src/feh.h      2018-03-04 08:55:59.000000000 +0100
@@ -27,6 +27,14 @@
 #ifndef FEH_H
 #define FEH_H
 
+/*
+ * strverscmp(3) is a GNU extension. In most supporting C libraries it
+ * requires _GNU_SOURCE to be defined.
+ */
+#ifdef HAVE_VERSCMP
+#define _GNU_SOURCE
+#endif
+
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 #include <X11/Xatom.h>
@@ -107,8 +115,6 @@
        SLIDE_JUMP_PREV_DIR
 };
 
-enum image_bg { IMAGE_BG_CHECKS = 1, IMAGE_BG_BLACK, IMAGE_BG_WHITE };
-
 #define INPLACE_EDIT_FLIP   -1
 #define INPLACE_EDIT_MIRROR -2
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.24/src/filelist.c new/feh-2.25/src/filelist.c
--- old/feh-2.24/src/filelist.c 2018-02-26 21:48:39.000000000 +0100
+++ new/feh-2.25/src/filelist.c 2018-03-04 08:55:59.000000000 +0100
@@ -397,14 +397,26 @@
        dst[n] = '\0';
 }
 
+#ifdef HAVE_VERSCMP
+inline int strcmp_or_strverscmp(const char *s1, const char *s2)
+{
+       if (!opt.version_sort)
+               return(strcmp(s1, s2));
+       else
+               return(strverscmp(s1, s2));
+}
+#else
+#define strcmp_or_strverscmp strcmp
+#endif
+
 int feh_cmp_filename(void *file1, void *file2)
 {
-       return(strcmp(FEH_FILE(file1)->filename, FEH_FILE(file2)->filename));
+       return(strcmp_or_strverscmp(FEH_FILE(file1)->filename, 
FEH_FILE(file2)->filename));
 }
 
 int feh_cmp_name(void *file1, void *file2)
 {
-       return(strcmp(FEH_FILE(file1)->name, FEH_FILE(file2)->name));
+       return(strcmp_or_strverscmp(FEH_FILE(file1)->name, 
FEH_FILE(file2)->name));
 }
 
 int feh_cmp_dirname(void *file1, void *file2)
@@ -413,7 +425,7 @@
        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)
+       if ((cmp = strcmp_or_strverscmp(dir1, dir2)) != 0)
                return(cmp);
        return(feh_cmp_name(file1, file2));
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.24/src/help.raw new/feh-2.25/src/help.raw
--- old/feh-2.24/src/help.raw   2018-02-26 21:48:39.000000000 +0100
+++ new/feh-2.25/src/help.raw   2018-03-04 08:55:59.000000000 +0100
@@ -52,6 +52,7 @@
                            name, filename, mtime, width, height, pixels, size,
                            or format
  -n, --reverse             Reverse sort order
+     --version-sort        Natural sort of (version) numbers within text
  -A, --action [;]ACTION    Specify action to perform when pressing <return>.
                            Executed by /bin/sh, may contain FORMAT SPECIFIERS
                            reloads image with \";\", switches to next otherwise
@@ -84,7 +85,7 @@
                            can be used multiple times to add multiple paths.
  -M, --menu-font FONT      Use FONT for the font in menus.
  -B, --image-bg STYLE      Set background for transparent images and the like.
-                           Accepted values: white, black, default
+                           Accepted values: default, checks, or a XColor (eg. 
#428bdd)
  -N, --no-menus            Don't load or show any menus.
      --no-xinerama         Disable Xinerama support
      --no-screen-clip      Do not limit window size to screen size
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.24/src/keyevents.c new/feh-2.25/src/keyevents.c
--- old/feh-2.24/src/keyevents.c        2018-02-26 21:48:39.000000000 +0100
+++ new/feh-2.25/src/keyevents.c        2018-03-04 08:55:59.000000000 +0100
@@ -185,6 +185,7 @@
        feh_set_kb("render"    , 0, XK_KP_Begin  , 0, XK_R         , 0, 0);
        feh_set_kb("toggle_actions" , 0, XK_a, 0, 0, 0, 0);
        feh_set_kb("toggle_aliasing" , 0, XK_A, 0, 0, 0, 0);
+       feh_set_kb("toggle_auto_zoom" , 0, XK_Z, 0, 0, 0, 0);
 #ifdef HAVE_LIBEXIF
        feh_set_kb("toggle_exif" , 0, XK_e, 0, 0, 0, 0);
 #endif
@@ -637,6 +638,10 @@
                winwid->force_aliasing = !winwid->force_aliasing;
                winwidget_render_image(winwid, 0, 0);
        }
+       else if (feh_is_kp(EVENT_toggle_auto_zoom, state, keysym, button)) {
+               opt.zoom_mode = (opt.zoom_mode == 0 ? ZOOM_MODE_MAX : 0);
+               winwidget_rerender_all(1);
+       }
        else if (feh_is_kp(EVENT_toggle_filenames, state, keysym, button)) {
                opt.draw_filename = !opt.draw_filename;
                winwidget_rerender_all(0);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.24/src/options.c new/feh-2.25/src/options.c
--- old/feh-2.24/src/options.c  2018-02-26 21:48:39.000000000 +0100
+++ new/feh-2.25/src/options.c  2018-03-04 08:55:59.000000000 +0100
@@ -415,6 +415,7 @@
                {"insecure"      , 0, 0, 240},
                {"no-recursive"  , 0, 0, 241},
                {"cache-size"    , 1, 0, 243},
+               {"version-sort"  , 0, 0, 246},
                {0, 0, 0, 0}
        };
        int optch = 0, cmdx = 0;
@@ -454,14 +455,7 @@
                        opt.actions[0] = estrdup(optarg);
                        break;
                case 'B':
-                       if (!strcmp(optarg, "checks"))
-                               opt.image_bg = IMAGE_BG_CHECKS;
-                       else if (!strcmp(optarg, "white"))
-                               opt.image_bg = IMAGE_BG_WHITE;
-                       else if (!strcmp(optarg, "black"))
-                               opt.image_bg = IMAGE_BG_BLACK;
-                       else
-                               weprintf("Unknown argument to --image-bg: %s", 
optarg);
+                       opt.image_bg = estrdup(optarg);
                        break;
                case 'C':
                        D(("adding fontpath %s\n", optarg));
@@ -787,6 +781,9 @@
                        if (opt.cache_size > 2048)
                                opt.cache_size = 2048;
                        break;
+               case 246:
+                       opt.version_sort = 1;
+                       break;
                default:
                        break;
                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.24/src/options.h new/feh-2.25/src/options.h
--- old/feh-2.24/src/options.h  2018-02-26 21:48:39.000000000 +0100
+++ new/feh-2.25/src/options.h  2018-03-04 08:55:59.000000000 +0100
@@ -71,7 +71,6 @@
        unsigned char cycle_once;
        unsigned char hold_actions[10];
        unsigned char text_bg;
-       unsigned char image_bg;
        unsigned char no_fehbg;
        unsigned char keep_zoom_vp;
        unsigned char insecure_ssl;
@@ -80,6 +79,7 @@
        char *output_file;
        char *output_dir;
        char *bg_file;
+       char *image_bg;
        char *font;
        char *title_font;
        char *title;
@@ -104,6 +104,7 @@
        unsigned int thumb_redraw;
        double reload;
        int sort;
+       int version_sort;
        int debug;
        int geom_flags;
        int geom_x;
@@ -188,6 +189,7 @@
        EVENT_render,
        EVENT_toggle_actions,
        EVENT_toggle_aliasing,
+       EVENT_toggle_auto_zoom,
 #ifdef HAVE_LIBEXIF
        EVENT_toggle_exif,
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.24/src/slideshow.c new/feh-2.25/src/slideshow.c
--- old/feh-2.24/src/slideshow.c        2018-02-26 21:48:39.000000000 +0100
+++ new/feh-2.25/src/slideshow.c        2018-03-04 08:55:59.000000000 +0100
@@ -107,6 +107,10 @@
                        add_file_to_filelist_recursively(l->data, 
FILELIST_FIRST);
        else if (!opt.filelistfile && !opt.bgmode)
                add_file_to_filelist_recursively(".", FILELIST_FIRST);
+
+       if (opt.filelistfile) {
+               filelist = gib_list_cat(filelist, 
feh_read_filelist(opt.filelistfile));
+       }
        
        if (!(filelist_len = gib_list_length(filelist))) {
                eprintf("No files found to reload.");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.24/src/wallpaper.c new/feh-2.25/src/wallpaper.c
--- old/feh-2.24/src/wallpaper.c        2018-02-26 21:48:39.000000000 +0100
+++ new/feh-2.25/src/wallpaper.c        2018-03-04 08:55:59.000000000 +0100
@@ -91,7 +91,7 @@
                feh_wm_load_next(&im);
 
        gib_imlib_render_image_on_drawable_at_size(pmap, im, x, y, w, h,
-                       1, 0, !opt.force_aliasing);
+                       1, 1, !opt.force_aliasing);
 
        if (use_filelist)
                gib_imlib_free_image_and_decache(im);
@@ -132,7 +132,7 @@
                y + ((offset_y > 0) ? offset_y : 0),
                w,
                h,
-               1, 0, 0);
+               1, 1, 0);
 
        if (use_filelist)
                gib_imlib_free_image_and_decache(im);
@@ -160,11 +160,36 @@
        render_x = (  cut_x ? ((img_w - render_w) >> 1) : 0);
        render_y = ( !cut_x ? ((img_h - render_h) >> 1) : 0);
 
+       if ((opt.geom_flags & XValue) && cut_x) {
+               if (opt.geom_flags & XNegative) {
+                       render_x = img_w - render_w + opt.geom_x;
+               } else {
+                       render_x = opt.geom_x;
+               }
+               if (render_x < 0) {
+                       render_x = 0;
+               } else if (render_x + render_w > img_w) {
+                       render_x = img_w - render_w;
+               }
+       }
+       else if ((opt.geom_flags & YValue) && !cut_x) {
+               if (opt.geom_flags & YNegative) {
+                       render_y = img_h - render_h + opt.geom_y;
+               } else {
+                       render_y = opt.geom_y;
+               }
+               if (render_y < 0) {
+                       render_y = 0;
+               } else if (render_y + render_h > img_h) {
+                       render_y = img_h - render_h;
+               }
+       }
+
        gib_imlib_render_image_part_on_drawable_at_size(pmap, im,
                render_x, render_y,
                render_w, render_h,
                x, y, w, h,
-               1, 0, !opt.force_aliasing);
+               1, 1, !opt.force_aliasing);
 
        if (use_filelist)
                gib_imlib_free_image_and_decache(im);
@@ -212,7 +237,7 @@
        gib_imlib_render_image_on_drawable_at_size(pmap, im,
                render_x, render_y,
                render_w, render_h,
-               1, 0, !opt.force_aliasing);
+               1, 1, !opt.force_aliasing);
 
        if (use_filelist)
                gib_imlib_free_image_and_decache(im);
@@ -307,15 +332,19 @@
 
                D(("Falling back to XSetRootWindowPixmap\n"));
 
+               XColor color;
+               Colormap cmap = DefaultColormap(disp, DefaultScreen(disp));
+               if (opt.image_bg)
+                       XAllocNamedColor(disp, cmap, (char*) opt.image_bg, 
&color, &color);
+               else
+                       XAllocNamedColor(disp, cmap, "black", &color, &color);
+
                if (scaled) {
                        pmap_d1 = XCreatePixmap(disp, root, scr->width, 
scr->height, depth);
 
 #ifdef HAVE_LIBXINERAMA
                        if (opt.xinerama_index >= 0) {
-                               if (opt.image_bg == IMAGE_BG_WHITE)
-                                       gcval.foreground = WhitePixel(disp, 
DefaultScreen(disp));
-                               else
-                                       gcval.foreground = BlackPixel(disp, 
DefaultScreen(disp));
+                               gcval.foreground = color.pixel;
                                gc = XCreateGC(disp, root, GCForeground, 
&gcval);
                                XFillRectangle(disp, pmap_d1, gc, 0, 0, 
scr->width, scr->height);
                                XFreeGC(disp, gc);
@@ -339,10 +368,7 @@
                        D(("centering\n"));
 
                        pmap_d1 = XCreatePixmap(disp, root, scr->width, 
scr->height, depth);
-                       if (opt.image_bg == IMAGE_BG_WHITE)
-                               gcval.foreground = WhitePixel(disp, 
DefaultScreen(disp));
-                       else
-                               gcval.foreground = BlackPixel(disp, 
DefaultScreen(disp));
+                       gcval.foreground = color.pixel;
                        gc = XCreateGC(disp, root, GCForeground, &gcval);
                        XFillRectangle(disp, pmap_d1, gc, 0, 0, scr->width, 
scr->height);
 
@@ -369,10 +395,7 @@
 
 #ifdef HAVE_LIBXINERAMA
                        if (opt.xinerama_index >= 0) {
-                               if (opt.image_bg == IMAGE_BG_WHITE)
-                                       gcval.foreground = WhitePixel(disp, 
DefaultScreen(disp));
-                               else
-                                       gcval.foreground = BlackPixel(disp, 
DefaultScreen(disp));
+                               gcval.foreground = color.pixel;
                                gc = XCreateGC(disp, root, GCForeground, 
&gcval);
                                XFillRectangle(disp, pmap_d1, gc, 0, 0, 
scr->width, scr->height);
                                XFreeGC(disp, gc);
@@ -395,10 +418,7 @@
                } else if (filled == 2) {
 
                        pmap_d1 = XCreatePixmap(disp, root, scr->width, 
scr->height, depth);
-                       if (opt.image_bg == IMAGE_BG_WHITE)
-                               gcval.foreground = WhitePixel(disp, 
DefaultScreen(disp));
-                       else
-                               gcval.foreground = BlackPixel(disp, 
DefaultScreen(disp));
+                       gcval.foreground = color.pixel;
                        gc = XCreateGC(disp, root, GCForeground, &gcval);
                        XFillRectangle(disp, pmap_d1, gc, 0, 0, scr->width, 
scr->height);
 
@@ -425,7 +445,7 @@
                        w = gib_imlib_image_get_width(im);
                        h = gib_imlib_image_get_height(im);
                        pmap_d1 = XCreatePixmap(disp, root, w, h, depth);
-                       gib_imlib_render_image_on_drawable(pmap_d1, im, 0, 0, 
1, 0, 0);
+                       gib_imlib_render_image_on_drawable(pmap_d1, im, 0, 0, 
1, 1, 0);
                }
 
                if (!opt.no_fehbg) {
@@ -474,7 +494,7 @@
                                free(path);
                        }
                }
-               
+
                /* create new display, copy pixmap to new display */
                disp2 = XOpenDisplay(NULL);
                if (!disp2)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.24/src/winwidget.c new/feh-2.25/src/winwidget.c
--- old/feh-2.24/src/winwidget.c        2018-02-26 21:48:39.000000000 +0100
+++ new/feh-2.25/src/winwidget.c        2018-03-04 08:55:59.000000000 +0100
@@ -382,17 +382,18 @@
                        if (winwid->gc == None) {
                                XGCValues gcval;
 
-                               if (opt.image_bg == IMAGE_BG_WHITE) {
-                                       gcval.foreground = WhitePixel(disp, 
DefaultScreen(disp));
+                               if (!opt.image_bg || !strcmp(opt.image_bg, 
"default")) {
+                                       gcval.foreground = BlackPixel(disp, 
DefaultScreen(disp));
                                        winwid->gc = XCreateGC(disp, 
winwid->win, GCForeground, &gcval);
-                               }
-                               else if (opt.image_bg == IMAGE_BG_CHECKS) {
+                               } else if (!strcmp(opt.image_bg, "checks")) {
                                        gcval.tile = feh_create_checks();
                                        gcval.fill_style = FillTiled;
                                        winwid->gc = XCreateGC(disp, 
winwid->win, GCTile | GCFillStyle, &gcval);
-                               }
-                               else {
-                                       gcval.foreground = BlackPixel(disp, 
DefaultScreen(disp));
+                               } else {
+                                       XColor color;
+                                       Colormap cmap = DefaultColormap(disp, 
DefaultScreen(disp));
+                                       XAllocNamedColor(disp, cmap, (char*) 
opt.image_bg, &color, &color);
+                                       gcval.foreground = color.pixel;
                                        winwid->gc = XCreateGC(disp, 
winwid->win, GCForeground, &gcval);
                                }
                        }
@@ -687,14 +688,15 @@
                if (!checks)
                        eprintf("Unable to create a teeny weeny imlib image. I 
detect problems");
 
-               if (opt.image_bg == IMAGE_BG_WHITE)
-                       gib_imlib_image_fill_rectangle(checks, 0, 0, 16, 16, 
255, 255, 255, 255);
-               else if (opt.image_bg == IMAGE_BG_BLACK)
-                       gib_imlib_image_fill_rectangle(checks, 0, 0, 16, 16, 0, 
0, 0, 255);
-               else {
+               if (!opt.image_bg || !strcmp(opt.image_bg, "default") || 
!strcmp(opt.image_bg, "checks")) {
                        gib_imlib_image_fill_rectangle(checks, 0, 0, 16, 16, 
144, 144, 144, 255);
                        gib_imlib_image_fill_rectangle(checks, 0, 0,  8,  8, 
100, 100, 100, 255);
                        gib_imlib_image_fill_rectangle(checks, 8, 8,  8,  8, 
100, 100, 100, 255);
+               } else {
+                       XColor color;
+                       Colormap cmap = DefaultColormap(disp, 
DefaultScreen(disp));
+                       XAllocNamedColor(disp, cmap, (char*) opt.image_bg, 
&color, &color);
+                       gib_imlib_image_fill_rectangle(checks, 0, 0, 16, 16, 
color.red, color.green, color.blue, 255);
                }
 
                checks_pmap = XCreatePixmap(disp, root, 16, 16, depth);


Reply via email to