summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2010-09-26 12:04:16 +0200
committerDaniel Friesel <derf@finalrewind.org>2010-09-26 12:04:16 +0200
commit287687d76c23c0274aa10835c8fcfcafcbc2a021 (patch)
tree349cfc7703d92a54172cf7331e7d5d5d7a37fdbf
parentbeecfafb1be6b5c573d5ed26ed219863734555b2 (diff)
winwidget.c: Only draw text in normal mode.
This way, zooming, panning etc. gets sped up quite a bit.
-rw-r--r--ChangeLog1
-rw-r--r--src/winwidget.c22
2 files changed, 13 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 321942d..cca9f5a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@ git HEAD
* Add --info option to display custom image information
* Do not change to the next slide when executing an action with ; as first
character (this character is stripped when executing the action)
+ * Speed up panning, zooming etc. by hiding image overlay text
Tue, 24 Aug 2010 19:23:36 +0200 Daniel Friesel <derf@chaosdorf.de>
diff --git a/src/winwidget.c b/src/winwidget.c
index 855e0da..bf7b989 100644
--- a/src/winwidget.c
+++ b/src/winwidget.c
@@ -531,16 +531,18 @@ void winwidget_render_image(winwidget winwid, int resize, int alias)
sh, dx, dy,
dw, dh, 1,
gib_imlib_image_has_alpha(winwid->im), alias);
- if (opt.caption_path)
- winwidget_update_caption(winwid);
- if (opt.draw_filename)
- feh_draw_filename(winwid);
- if (opt.draw_actions)
- feh_draw_actions(winwid);
- if ((opt.mode == MODE_ZOOM) && !alias)
- feh_draw_zoom(winwid);
- if (opt.info_cmd)
- feh_draw_info(winwid);
+ if (opt.mode == MODE_NORMAL) {
+ if (opt.caption_path)
+ winwidget_update_caption(winwid);
+ if (opt.draw_filename)
+ feh_draw_filename(winwid);
+ if (opt.draw_actions)
+ feh_draw_actions(winwid);
+ if ((opt.mode == MODE_ZOOM) && !alias)
+ feh_draw_zoom(winwid);
+ if (opt.info_cmd)
+ feh_draw_info(winwid);
+ }
XSetWindowBackgroundPixmap(disp, winwid->win, winwid->bg_pmap);
XClearWindow(disp, winwid->win);
return;