From: YAMAMOTO Mitsuharu Date: Thu, 30 May 2019 01:05:27 +0000 (+0900) Subject: Fix breakage of native image scaling on XRENDER by previous change X-Git-Tag: emacs-27.0.90~2759 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=46a176169b9050a5e6d97b11f265bd58b4b5eb05;p=emacs.git Fix breakage of native image scaling on XRENDER by previous change * src/image.c (image_create_x_image_and_pixmap_1) [HAVE_XRENDER]: Get depth if it is unspecified. --- diff --git a/src/image.c b/src/image.c index 70ca1079f3f..c5d97e05743 100644 --- a/src/image.c +++ b/src/image.c @@ -2270,6 +2270,8 @@ image_create_x_image_and_pixmap_1 (struct frame *f, int width, int height, int d int event_basep, error_basep; if (picture && XRenderQueryExtension (display, &event_basep, &error_basep)) { + if (depth <= 0) + depth = DefaultDepthOfScreen (FRAME_X_SCREEN (f)); if (depth == 32 || depth == 24 || depth == 8) { XRenderPictFormat *format;