]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix breakage of native image scaling on XRENDER by previous change
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Thu, 30 May 2019 01:05:27 +0000 (10:05 +0900)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Thu, 30 May 2019 01:05:27 +0000 (10:05 +0900)
* src/image.c (image_create_x_image_and_pixmap_1) [HAVE_XRENDER]: Get depth if
it is unspecified.

src/image.c

index 70ca1079f3fbbee9328e7d595bdf3842a4e94225..c5d97e05743d99003361000f36061710385c65a9 100644 (file)
@@ -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;