diff options
author | Alan Third <alan@idiocy.org> | 2020-12-05 19:40:08 +0000 |
---|---|---|
committer | Alan Third <alan@idiocy.org> | 2020-12-12 10:30:39 +0000 |
commit | 62a6934af9c110c28fc1f69f4bb1b79ce9d0c43d (patch) | |
tree | caf81eb7b88cd154cf0d203beced8b4879f955e5 /src/dispextern.h | |
parent | de032d41c6c9dc143a5d2ddcacdccd20567aee8c (diff) | |
download | emacs-62a6934af9c110c28fc1f69f4bb1b79ce9d0c43d.tar.gz emacs-62a6934af9c110c28fc1f69f4bb1b79ce9d0c43d.tar.bz2 emacs-62a6934af9c110c28fc1f69f4bb1b79ce9d0c43d.zip |
Fix crash when using XRender and restoring image from X (bug#44930)
* src/dispextern.h (struct image): Add original dimension elements.
* src/image.c (image_set_transform): Store the original dimensions.
(image_get_x_image): If we're using transforms use the original
dimensions with XGetImage.
Diffstat (limited to 'src/dispextern.h')
-rw-r--r-- | src/dispextern.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dispextern.h b/src/dispextern.h index 6b72e68d315..44556276ff5 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3047,6 +3047,10 @@ struct image # if !defined USE_CAIRO && defined HAVE_XRENDER /* Picture versions of pixmap and mask for compositing. */ Picture picture, mask_picture; + + /* We need to store the original image dimensions in case we have to + call XGetImage. */ + int original_width, original_height; # endif #endif /* HAVE_X_WINDOWS */ #ifdef HAVE_NTGUI |