From: Jan Djärv Date: Fri, 2 Feb 2007 10:31:13 +0000 (+0000) Subject: [!USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_expose): Use X-Git-Tag: emacs-pretest-22.0.94~460 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1024f9c0d83dec0b3ee82db54c5b25de23021b02;p=emacs.git [!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 --git a/src/ChangeLog b/src/ChangeLog index bfc82e05a5e..7de878297b3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2007-01-29 Andreas Seltenreich (tiny change) + + * xterm.c [!USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_expose): Use + the foreground color of the scroll-bar face when drawing the + scroll-bar's border. + 2007-02-02 Jan Dj,Ad(Brv * xterm.c (do_ewmh_fullscreen): Check that what != NULL before diff --git a/src/xterm.c b/src/xterm.c index 3650f3cc541..cf319b374d9 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -5279,6 +5279,11 @@ x_scroll_bar_expose (bar, event) 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 @@ x_scroll_bar_expose (bar, event) 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 */