From: Po Lu Date: Mon, 7 Mar 2022 02:54:48 +0000 (+0800) Subject: Fix clearing of scroll bars on builds with disabled double buffers X-Git-Tag: emacs-29.0.90~1982 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3e5baffd033c0e7cb738d0762a66302f2d7d2214;p=emacs.git 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. --- diff --git a/src/xterm.c b/src/xterm.c index d368c723239..0432bd78c6e 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 }