[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master ea5a0142ce: Respect inhibit-double-buffering on non-toolkit scrol
From: |
Po Lu |
Subject: |
master ea5a0142ce: Respect inhibit-double-buffering on non-toolkit scroll bars |
Date: |
Sun, 6 Mar 2022 08:05:46 -0500 (EST) |
branch: master
commit ea5a0142ced33884a370e9a47f8035f303382ba7
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Respect inhibit-double-buffering on non-toolkit scroll bars
* src/xfns.c (x_set_inhibit_double_buffering): Force scroll bars
to be re-created on builds without toolkit scroll bars.
* src/xterm.c (x_scroll_bar_create): Don't initialize back
buffer if double buffering is disabled for the frame.
---
src/xfns.c | 14 +++++++++++++-
src/xterm.c | 3 ++-
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/xfns.c b/src/xfns.c
index 65218b3fc0..e288f797fb 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -818,7 +818,19 @@ x_set_inhibit_double_buffering (struct frame *f,
and after any potential change. One of the calls will end up
being a no-op. */
if (want_double_buffering != was_double_buffered)
- font_drop_xrender_surfaces (f);
+ {
+ font_drop_xrender_surfaces (f);
+
+ /* Scroll bars decide whether or not to use a back buffer
+ based on the value of this frame parameter, so destroy
+ all scroll bars. */
+#ifndef USE_TOOLKIT_SCROLL_BARS
+ if (FRAME_TERMINAL (f)->condemn_scroll_bars_hook)
+ FRAME_TERMINAL (f)->condemn_scroll_bars_hook (f);
+ if (FRAME_TERMINAL (f)->judge_scroll_bars_hook)
+ FRAME_TERMINAL (f)->judge_scroll_bars_hook (f);
+#endif
+ }
if (FRAME_X_DOUBLE_BUFFERED_P (f) && !want_double_buffering)
tear_down_x_back_buffer (f);
else if (!FRAME_X_DOUBLE_BUFFERED_P (f) && want_double_buffering)
diff --git a/src/xterm.c b/src/xterm.c
index 1d68d4e939..8642345549 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -8583,7 +8583,8 @@ x_scroll_bar_create (struct window *w, int top, int left,
/* Attributes. */
mask, &a);
#ifdef HAVE_XDBE
- if (FRAME_DISPLAY_INFO (f)->supports_xdbe)
+ if (FRAME_DISPLAY_INFO (f)->supports_xdbe
+ && FRAME_X_DOUBLE_BUFFERED_P (f))
{
x_catch_errors (FRAME_X_DISPLAY (f));
drawable = XdbeAllocateBackBufferName (FRAME_X_DISPLAY (f),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master ea5a0142ce: Respect inhibit-double-buffering on non-toolkit scroll bars,
Po Lu <=