emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master dee029e19f: * src/xterm.c (x_composite_image): Use the display's


From: Po Lu
Subject: master dee029e19f: * src/xterm.c (x_composite_image): Use the display's picture format.
Date: Mon, 24 Jan 2022 03:24:02 -0500 (EST)

branch: master
commit dee029e19ff1874e7483ccd3e5994bda6e3c7e5d
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    * src/xterm.c (x_composite_image): Use the display's picture format.
---
 src/xterm.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/xterm.c b/src/xterm.c
index 6ca270ec06..bf611db6bc 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -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);
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]