summaryrefslogtreecommitdiff
path: root/src/image.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/image.c b/src/image.c
index a3301ad2dda..dc06e9ce208 100644
--- a/src/image.c
+++ b/src/image.c
@@ -2170,6 +2170,10 @@ image_set_transform (struct frame *f, struct image *img)
# if !defined USE_CAIRO && defined HAVE_XRENDER
if (!img->picture)
return;
+
+ /* Store the original dimensions as we'll overwrite them later. */
+ img->original_width = img->width;
+ img->original_height = img->height;
# endif
/* Determine size. */
@@ -3029,6 +3033,11 @@ image_get_x_image (struct frame *f, struct image *img, bool mask_p)
if (ximg_in_img)
return ximg_in_img;
+#ifdef HAVE_XRENDER
+ else if (img->picture)
+ return XGetImage (FRAME_X_DISPLAY (f), !mask_p ? img->pixmap : img->mask,
+ 0, 0, img->original_width, img->original_height, ~0, ZPixmap);
+#endif
else
return XGetImage (FRAME_X_DISPLAY (f), !mask_p ? img->pixmap : img->mask,
0, 0, img->width, img->height, ~0, ZPixmap);