]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't use XRender to fill rectangles unless an alpha channel exists
authorPo Lu <luangruo@yahoo.com>
Wed, 2 Feb 2022 01:17:31 +0000 (09:17 +0800)
committerPo Lu <luangruo@yahoo.com>
Wed, 2 Feb 2022 01:17:31 +0000 (09:17 +0800)
* src/xterm.c (x_clear_area): Don't use XRender unless
`alpha_bits' is set.

src/xterm.c

index 843483b594a0ba6329e15b2a7295999eb2477b34..68488b3ef5505be32a20692f0e20d8d0d645fd1c 100644 (file)
@@ -4769,7 +4769,8 @@ x_clear_area (struct frame *f, int x, int y, int width, int height)
 #if defined HAVE_XRENDER && \
   (RENDER_MAJOR > 0 || (RENDER_MINOR >= 2))
       x_xr_ensure_picture (f);
-      if (FRAME_X_PICTURE (f) != None
+      if (FRAME_DISPLAY_INFO (f)->alpha_bits
+         && FRAME_X_PICTURE (f) != None
          && FRAME_CHECK_XR_VERSION (f, 0, 2))
        {
          XRenderColor xc;