summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-07-14 18:59:56 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2010-07-14 18:59:56 +0200
commit4ddc466f4daa9eb256f47b3805ce0351c2959a3b (patch)
tree235f8cc87a03df5e21bf1f1d68ad522ef33f3692
parentfaf43f2c0260291df6f3b9737161486581425c04 (diff)
Patch by Noel Cragg: Make feh actually usable in tiling mode
-rw-r--r--ChangeLog1
-rw-r--r--src/winwidget.c21
2 files changed, 14 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 37aecbb..77066e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@ git HEAD
-K for --caption-papth,
-G for --draw-actions
and -J for --thumb-redraw
+ * Patch by Noel Cragg: Improve support for tiling window managers
Fri, 25 Jun 2010 16:07:20 +0200 Daniel Friesel <derf@chaosdorf.de>
diff --git a/src/winwidget.c b/src/winwidget.c
index b59c98b..fdd86e2 100644
--- a/src/winwidget.c
+++ b/src/winwidget.c
@@ -147,6 +147,8 @@ void winwidget_create_window(winwidget ret, int w, int h)
int x = 0;
int y = 0;
+ D(4, ("winwidget_create_window %dx%d\n", w, h));
+
if (ret->full_screen) {
w = scr->width;
h = scr->height;
@@ -342,22 +344,25 @@ void winwidget_render_image(winwidget winwid, int resize, int alias)
if (winwid->im_y > winwid->h)
winwid->im_y = winwid->h;
- winwidget_setup_pixmaps(winwid);
+ D(2, ("winwidget_render_image resize %d alias %d im %dx%d\n",
+ resize, alias, winwid->im_w, winwid->im_h));
- if (!winwid->full_screen && ((gib_imlib_image_has_alpha(winwid->im)) || (opt.geom_flags)
- || (winwid->im_x || winwid->im_y) || (winwid->zoom != 1.0)
- || (winwid->w > winwid->im_w || winwid->h > winwid->im_h)
- || (winwid->has_rotated)))
- feh_draw_checks(winwid);
+ winwidget_setup_pixmaps(winwid);
if (!winwid->full_screen && opt.scale_down && ((winwid->w < winwid->im_w)
|| (winwid->h < winwid->im_h))) {
- D(2, ("scaling down image\n"));
+ D(2, ("scaling down image %dx%d\n", winwid->w, winwid->h));
feh_calc_needed_zoom(&(winwid->zoom), winwid->im_w, winwid->im_h, winwid->w, winwid->h);
- winwidget_resize(winwid, winwid->im_w * winwid->zoom, winwid->im_h * winwid->zoom);
+ D(2, ("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)
+ || (winwid->im_x || winwid->im_y) || (winwid->zoom != 1.0)
+ || (winwid->w > winwid->im_w || winwid->h > winwid->im_h)
+ || (winwid->has_rotated)))
+ feh_draw_checks(winwid);
+
if (resize && (winwid->full_screen || opt.geom_flags)) {
int smaller; /* Is the image smaller than screen? */
int max_w = 0, max_h = 0;