aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2022-03-05 10:05:14 +0800
committerPo Lu2022-03-05 10:05:14 +0800
commit76d79e1576956eb0c07eb830fd75f7b7c4192efe (patch)
tree2393a110b4157a1efda9f4dc2a91377de3275cf0 /src
parent6efed75ff3158214d16482f2bcca06c9ac010da4 (diff)
downloademacs-76d79e1576956eb0c07eb830fd75f7b7c4192efe.tar.gz
emacs-76d79e1576956eb0c07eb830fd75f7b7c4192efe.zip
Prevent some NoExpose events from being generated
* src/xterm.c (x_scroll_run): Use the rendering extension if available to avoid NoExpose events.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 948afa56808..89ec43b4705 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -6037,12 +6037,24 @@ x_scroll_run (struct window *w, struct run *run)
6037 } 6037 }
6038 else 6038 else
6039#endif /* USE_CAIRO */ 6039#endif /* USE_CAIRO */
6040 XCopyArea (FRAME_X_DISPLAY (f), 6040 {
6041 FRAME_X_DRAWABLE (f), FRAME_X_DRAWABLE (f), 6041#ifdef HAVE_XRENDER
6042 f->output_data.x->normal_gc, 6042 /* Avoid useless NoExpose events. This way, we only get regular
6043 x, from_y, 6043 exposure events when there is actually something to
6044 width, height, 6044 expose. */
6045 x, to_y); 6045 if (FRAME_X_PICTURE (f) != None)
6046 XRenderComposite (FRAME_X_DISPLAY (f), PictOpSrc, FRAME_X_PICTURE (f),
6047 None, FRAME_X_PICTURE (f), x, from_y, 0, 0, x, to_y,
6048 width, height);
6049 else
6050#endif
6051 XCopyArea (FRAME_X_DISPLAY (f),
6052 FRAME_X_DRAWABLE (f), FRAME_X_DRAWABLE (f),
6053 f->output_data.x->normal_gc,
6054 x, from_y,
6055 width, height,
6056 x, to_y);
6057 }
6046 6058
6047 unblock_input (); 6059 unblock_input ();
6048} 6060}