# HG changeset patch # User Jan Dj¸«£rv # Date 1170412262 0 # Node ID a769ec5ab88387409f8b6a878d030ef025852976 # Parent 78cbb66b89d54c1fa52390db49cc0ea9a1264e46 [!USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_expose): Use the foreground color of the scroll-bar face when drawing the scroll-bar's border. diff -r 78cbb66b89d5 -r a769ec5ab883 src/xterm.c --- a/src/xterm.c Fri Feb 02 09:35:02 2007 +0000 +++ b/src/xterm.c Fri Feb 02 10:31:02 2007 +0000 @@ -5279,6 +5279,11 @@ x_scroll_bar_set_handle (bar, XINT (bar->start), XINT (bar->end), 1); + /* Switch to scroll bar foreground color. */ + if (f->output_data.x->scroll_bar_foreground_pixel != -1) + XSetForeground (FRAME_X_DISPLAY (f), gc, + f->output_data.x->scroll_bar_foreground_pixel); + /* Draw a one-pixel border just inside the edges of the scroll bar. */ XDrawRectangle (FRAME_X_DISPLAY (f), w, gc, @@ -5287,7 +5292,12 @@ XINT (bar->width) - 1 - width_trim - width_trim, XINT (bar->height) - 1); - UNBLOCK_INPUT; + /* Restore the foreground color of the GC if we changed it above. */ + if (f->output_data.x->scroll_bar_foreground_pixel != -1) + XSetForeground (FRAME_X_DISPLAY (f), gc, + f->output_data.x->foreground_pixel); + + UNBLOCK_INPUT; } #endif /* not USE_TOOLKIT_SCROLL_BARS */