summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.mk3
-rw-r--r--src/gib_hash.c1
-rw-r--r--src/options.c1
-rw-r--r--src/winwidget.c8
4 files changed, 9 insertions, 4 deletions
diff --git a/config.mk b/config.mk
index b230e3d..394a13f 100644
--- a/config.mk
+++ b/config.mk
@@ -37,6 +37,9 @@ scalable_icon_dir = ${icon_dir}/scalable/apps
CFLAGS ?= -g -O2
CFLAGS += -Wall -Wextra -pedantic
+# Settings for glibc >= 2.19 - may need to be adjusted for other systems
+CFLAGS += -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500
+
ifeq (${curl},1)
CFLAGS += -DHAVE_LIBCURL
LDLIBS += -lcurl
diff --git a/src/gib_hash.c b/src/gib_hash.c
index a378b9c..15bbf4a 100644
--- a/src/gib_hash.c
+++ b/src/gib_hash.c
@@ -26,6 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "gib_hash.h"
#include "utils.h"
#include "debug.h"
+#include <strings.h>
gib_hash_node *gib_hash_node_new(char *key, void *data)
{
diff --git a/src/options.c b/src/options.c
index 4f87685..1ed5b54 100644
--- a/src/options.c
+++ b/src/options.c
@@ -27,6 +27,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "feh.h"
#include "filelist.h"
#include "options.h"
+#include <strings.h>
static void check_options(void);
static void feh_getopt_theme(int argc, char **argv);
diff --git a/src/winwidget.c b/src/winwidget.c
index 6f64844..81f3c4f 100644
--- a/src/winwidget.c
+++ b/src/winwidget.c
@@ -455,7 +455,7 @@ void winwidget_render_image(winwidget winwid, int resize, int force_alias)
|| (winwid->has_rotated)))
feh_draw_checks(winwid);
- if (!winwid->full_screen && opt.zoom_mode
+ if (!winwid->full_screen && opt.zoom_mode && (winwid->type != WIN_TYPE_THUMBNAIL)
&& (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);
@@ -464,14 +464,14 @@ void winwidget_render_image(winwidget winwid, int resize, int force_alias)
* In case of a resize, the geomflags (and im_w, im_h) get updated by
* the ConfigureNotify handler.
*/
- if (need_center && !winwid->full_screen
+ if (need_center && !winwid->full_screen && (winwid->type != WIN_TYPE_THUMBNAIL)
&& (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.geom_flags & (WidthValue | HeightValue)))) {
+ if (resize && (winwid->type != WIN_TYPE_THUMBNAIL) &&
+ (winwid->full_screen || (opt.geom_flags & (WidthValue | HeightValue)))) {
int smaller; /* Is the image smaller than screen? */
int max_w = 0, max_h = 0;