From 27658a0a3b311ad38b87b9981c6e7b9aaae40728 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Mon, 14 Feb 2022 09:52:05 +0800 Subject: [PATCH] Try to reduce empty areas on GTK when a frame is being resized * src/xterm.c (x_fill_rectangle): (x_clear_rectangle, x_draw_image_glyph_string): (x_clear_area): Don't use picture if frame background is opaque. --- src/xterm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xterm.c b/src/xterm.c index b8d0a2b58b6..a17b445701b 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -1390,6 +1390,7 @@ x_fill_rectangle (struct frame *f, GC gc, int x, int y, int width, int height, #else #if defined HAVE_XRENDER && (RENDER_MAJOR > 0 || (RENDER_MINOR >= 2)) if (respect_alpha_background + && f->alpha_background != 1.0 && FRAME_DISPLAY_INFO (f)->alpha_bits && FRAME_CHECK_XR_VERSION (f, 0, 2)) { @@ -1432,6 +1433,7 @@ x_clear_rectangle (struct frame *f, GC gc, int x, int y, int width, int height, #else #if defined HAVE_XRENDER && (RENDER_MAJOR > 0 || (RENDER_MINOR >= 2)) if (respect_alpha_background + && f->alpha_background != 1.0 && FRAME_DISPLAY_INFO (f)->alpha_bits && FRAME_CHECK_XR_VERSION (f, 0, 2)) { @@ -4255,6 +4257,7 @@ x_draw_image_glyph_string (struct glyph_string *s) XGCValues xgcv; #if defined HAVE_XRENDER && (RENDER_MAJOR > 0 || (RENDER_MINOR >= 2)) if (FRAME_DISPLAY_INFO (s->f)->alpha_bits + && s->f->alpha_background != 1.0 && FRAME_CHECK_XR_VERSION (s->f, 0, 2) && FRAME_X_PICTURE_FORMAT (s->f)) { @@ -4939,6 +4942,7 @@ x_clear_area (struct frame *f, int x, int y, int width, int height) x_xr_ensure_picture (f); if (FRAME_DISPLAY_INFO (f)->alpha_bits && FRAME_X_PICTURE (f) != None + && f->alpha_background != 1.0 && FRAME_CHECK_XR_VERSION (f, 0, 2)) { XRenderColor xc; -- 2.39.5