diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/winwidget.c | 21 |
2 files changed, 14 insertions, 8 deletions
@@ -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; |