]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/xterm.c (x_composite_image): Use the display's picture format.
authorPo Lu <luangruo@yahoo.com>
Mon, 24 Jan 2022 08:22:54 +0000 (16:22 +0800)
committerPo Lu <luangruo@yahoo.com>
Mon, 24 Jan 2022 08:22:54 +0000 (16:22 +0800)
src/xterm.c

index 6ca270ec06f92030183872c41a68803abe026f51..bf611db6bca4b76a42fe25f27c4fab88df5cff90 100644 (file)
@@ -3488,14 +3488,15 @@ x_composite_image (struct glyph_string *s, Pixmap dest,
 {
   Display *display = FRAME_X_DISPLAY (s->f);
 #ifdef HAVE_XRENDER
-  if (s->img->picture)
+  if (s->img->picture && FRAME_X_PICTURE_FORMAT (s->f))
     {
       Picture destination;
       XRenderPictFormat *default_format;
       XRenderPictureAttributes attr;
+      /* Pacify GCC.  */
+      memset (&attr, 0, sizeof attr);
 
-      default_format = XRenderFindVisualFormat (display,
-                                                DefaultVisual (display, 0));
+      default_format = FRAME_X_PICTURE_FORMAT (s->f);
       destination = XRenderCreatePicture (display, dest,
                                           default_format, 0, &attr);