[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 76d79e1576: Prevent some NoExpose events from being generated
From: |
Po Lu |
Subject: |
master 76d79e1576: Prevent some NoExpose events from being generated |
Date: |
Fri, 4 Mar 2022 21:07:37 -0500 (EST) |
branch: master
commit 76d79e1576956eb0c07eb830fd75f7b7c4192efe
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Prevent some NoExpose events from being generated
* src/xterm.c (x_scroll_run): Use the rendering extension if
available to avoid NoExpose events.
---
src/xterm.c | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/src/xterm.c b/src/xterm.c
index 948afa5680..89ec43b470 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -6037,12 +6037,24 @@ x_scroll_run (struct window *w, struct run *run)
}
else
#endif /* USE_CAIRO */
- XCopyArea (FRAME_X_DISPLAY (f),
- FRAME_X_DRAWABLE (f), FRAME_X_DRAWABLE (f),
- f->output_data.x->normal_gc,
- x, from_y,
- width, height,
- x, to_y);
+ {
+#ifdef HAVE_XRENDER
+ /* Avoid useless NoExpose events. This way, we only get regular
+ exposure events when there is actually something to
+ expose. */
+ if (FRAME_X_PICTURE (f) != None)
+ XRenderComposite (FRAME_X_DISPLAY (f), PictOpSrc, FRAME_X_PICTURE (f),
+ None, FRAME_X_PICTURE (f), x, from_y, 0, 0, x, to_y,
+ width, height);
+ else
+#endif
+ XCopyArea (FRAME_X_DISPLAY (f),
+ FRAME_X_DRAWABLE (f), FRAME_X_DRAWABLE (f),
+ f->output_data.x->normal_gc,
+ x, from_y,
+ width, height,
+ x, to_y);
+ }
unblock_input ();
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 76d79e1576: Prevent some NoExpose events from being generated,
Po Lu <=