diff options
| author | Po Lu | 2022-03-06 21:04:34 +0800 |
|---|---|---|
| committer | Po Lu | 2022-03-06 21:04:34 +0800 |
| commit | ea5a0142ced33884a370e9a47f8035f303382ba7 (patch) | |
| tree | 2827b8ee0275a2ec546e1ccd0a207ec3160e5fd3 /src | |
| parent | 450f3f8725ff231aeda2738e25b4bb2cebe5a35b (diff) | |
| download | emacs-ea5a0142ced33884a370e9a47f8035f303382ba7.tar.gz emacs-ea5a0142ced33884a370e9a47f8035f303382ba7.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 14 | ||||
| -rw-r--r-- | src/xterm.c | 3 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/xfns.c b/src/xfns.c index 65218b3fc07..e288f797fbd 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -818,7 +818,19 @@ x_set_inhibit_double_buffering (struct frame *f, | |||
| 818 | and after any potential change. One of the calls will end up | 818 | and after any potential change. One of the calls will end up |
| 819 | being a no-op. */ | 819 | being a no-op. */ |
| 820 | if (want_double_buffering != was_double_buffered) | 820 | if (want_double_buffering != was_double_buffered) |
| 821 | font_drop_xrender_surfaces (f); | 821 | { |
| 822 | font_drop_xrender_surfaces (f); | ||
| 823 | |||
| 824 | /* Scroll bars decide whether or not to use a back buffer | ||
| 825 | based on the value of this frame parameter, so destroy | ||
| 826 | all scroll bars. */ | ||
| 827 | #ifndef USE_TOOLKIT_SCROLL_BARS | ||
| 828 | if (FRAME_TERMINAL (f)->condemn_scroll_bars_hook) | ||
| 829 | FRAME_TERMINAL (f)->condemn_scroll_bars_hook (f); | ||
| 830 | if (FRAME_TERMINAL (f)->judge_scroll_bars_hook) | ||
| 831 | FRAME_TERMINAL (f)->judge_scroll_bars_hook (f); | ||
| 832 | #endif | ||
| 833 | } | ||
| 822 | if (FRAME_X_DOUBLE_BUFFERED_P (f) && !want_double_buffering) | 834 | if (FRAME_X_DOUBLE_BUFFERED_P (f) && !want_double_buffering) |
| 823 | tear_down_x_back_buffer (f); | 835 | tear_down_x_back_buffer (f); |
| 824 | else if (!FRAME_X_DOUBLE_BUFFERED_P (f) && want_double_buffering) | 836 | else if (!FRAME_X_DOUBLE_BUFFERED_P (f) && want_double_buffering) |
diff --git a/src/xterm.c b/src/xterm.c index 1d68d4e9393..8642345549c 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -8583,7 +8583,8 @@ x_scroll_bar_create (struct window *w, int top, int left, | |||
| 8583 | /* Attributes. */ | 8583 | /* Attributes. */ |
| 8584 | mask, &a); | 8584 | mask, &a); |
| 8585 | #ifdef HAVE_XDBE | 8585 | #ifdef HAVE_XDBE |
| 8586 | if (FRAME_DISPLAY_INFO (f)->supports_xdbe) | 8586 | if (FRAME_DISPLAY_INFO (f)->supports_xdbe |
| 8587 | && FRAME_X_DOUBLE_BUFFERED_P (f)) | ||
| 8587 | { | 8588 | { |
| 8588 | x_catch_errors (FRAME_X_DISPLAY (f)); | 8589 | x_catch_errors (FRAME_X_DISPLAY (f)); |
| 8589 | drawable = XdbeAllocateBackBufferName (FRAME_X_DISPLAY (f), | 8590 | drawable = XdbeAllocateBackBufferName (FRAME_X_DISPLAY (f), |