From 46a176169b9050a5e6d97b11f265bd58b4b5eb05 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Thu, 30 May 2019 10:05:27 +0900 Subject: [PATCH] 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. --- src/image.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.39.5