emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 3e5baffd03: Fix clearing of scroll bars on builds with disabled d


From: Po Lu
Subject: master 3e5baffd03: Fix clearing of scroll bars on builds with disabled double buffers
Date: Sun, 6 Mar 2022 21:56:04 -0500 (EST)

branch: master
commit 3e5baffd033c0e7cb738d0762a66302f2d7d2214
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix clearing of scroll bars on builds with disabled double buffers
    
    * src/xterm.c (x_scroll_bar_clear): Use XClearArea if the scroll
    bar is not double-buffered.
---
 src/xterm.c | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/src/xterm.c b/src/xterm.c
index d368c72323..0432bd78c6 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -9635,15 +9635,19 @@ x_scroll_bar_clear (struct frame *f)
     for (bar = FRAME_SCROLL_BARS (f); VECTORP (bar);
         bar = XSCROLL_BAR (bar)->next)
       {
-#ifndef HAVE_XDBE
-       XClearArea (FRAME_X_DISPLAY (f),
-                   XSCROLL_BAR (bar)->x_window,
-                   0, 0, 0, 0, True);
-#else
-       XFillRectangle (FRAME_X_DISPLAY (f),
-                       XSCROLL_BAR (bar)->x_drawable,
-                       gc, 0, 0, XSCROLL_BAR (bar)->width,
-                       XSCROLL_BAR (bar)->height);
+#ifdef HAVE_XDBE
+       if (XSCROLL_BAR (bar)->x_window
+           == XSCROLL_BAR (bar)->x_drawable)
+#endif
+         XClearArea (FRAME_X_DISPLAY (f),
+                     XSCROLL_BAR (bar)->x_window,
+                     0, 0, 0, 0, True);
+#ifdef HAVE_XDBE
+       else
+         XFillRectangle (FRAME_X_DISPLAY (f),
+                         XSCROLL_BAR (bar)->x_drawable,
+                         gc, 0, 0, XSCROLL_BAR (bar)->width,
+                         XSCROLL_BAR (bar)->height);
 #endif
       }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]