From: Po Lu Date: Mon, 24 Jan 2022 08:22:54 +0000 (+0800) Subject: * src/xterm.c (x_composite_image): Use the display's picture format. X-Git-Tag: emacs-29.0.90~2820 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dee029e19ff1874e7483ccd3e5994bda6e3c7e5d;p=emacs.git * src/xterm.c (x_composite_image): Use the display's picture format. --- diff --git a/src/xterm.c b/src/xterm.c index 6ca270ec06f..bf611db6bca 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);