summaryrefslogtreecommitdiff
path: root/src/pixmap.h
diff options
context:
space:
mode:
authorMichael Jennings <mej@kainx.org>2001-08-10 20:52:51 +0000
committerMichael Jennings <mej@kainx.org>2001-08-10 20:52:51 +0000
commit450ad4f34fd15758d1c334a2229339c5f3f55d46 (patch)
tree006a641855ee2a44e119dfa0a6439890e5eadd46 /src/pixmap.h
parentcd4595128bd2ab0d20c9cac6d5a90314da4966af (diff)
downloadeterm-450ad4f34fd15758d1c334a2229339c5f3f55d46.tar.gz
Fri Aug 10 13:51:34 2001 Michael Jennings (mej)
I noticed this when I tested the smoked glass theme, but I forgot about it until Martin Tyler <martin@boo.org> reminded me. This should fix the bogus calls to imlib_image_get_filename() etc. when using transparency and shading. SVN revision: 5091
Diffstat (limited to 'src/pixmap.h')
-rw-r--r--src/pixmap.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/pixmap.h b/src/pixmap.h
index 677fa12..352f21d 100644
--- a/src/pixmap.h
+++ b/src/pixmap.h
@@ -130,9 +130,15 @@ enum {
#define image_mode_is(which, bit) (images[which].mode & (bit))
#define image_mode_fallback(which) do {if (image_mode_is((which), ALLOW_IMAGE)) {image_set_mode((which), MODE_IMAGE);} else {image_set_mode((which), MODE_SOLID);}} while (0)
#define redraw_all_images() do {render_simage(images[image_bg].current, TermWin.vt, TermWin_TotalWidth(), TermWin_TotalHeight(), image_bg, 0); \
- scr_touch(); scrollbar_draw(IMAGE_STATE_CURRENT, MODE_MASK); if (image_mode_any(MODE_AUTO)) enl_ipc_sync();} while (0)
-#define reload_image(iml) do {Imlib_Image tmp_im; imlib_context_set_image((iml)->im); tmp_im = imlib_load_image_immediately(imlib_image_get_filename()); \
- imlib_free_image_and_decache(); (iml)->im = tmp_im;} while (0)
+ scr_touch(); scrollbar_draw(IMAGE_STATE_CURRENT, MODE_MASK); if (image_mode_any(MODE_AUTO)) enl_ipc_sync(); \
+ } while (0)
+#define reload_image(iml) do {Imlib_Image tmp_im; \
+ if ((iml) && (iml->im)) { \
+ imlib_context_set_image((iml)->im); \
+ tmp_im = imlib_load_image_immediately(imlib_image_get_filename()); \
+ imlib_free_image_and_decache(); (iml)->im = tmp_im; \
+ } \
+ } while (0)
/* Elements of an simage to be reset */
#define RESET_NONE (0UL)