From: Miles Bader Date: Fri, 5 Oct 2001 16:36:29 +0000 (+0000) Subject: (x_set_scroll_bar_background) [USE_TOOLKIT_SCROLL_BARS]: X-Git-Tag: ttn-vms-21-2-B4~19701 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f15340b797108012cb1751c280ef288985751c40;p=emacs.git (x_set_scroll_bar_background) [USE_TOOLKIT_SCROLL_BARS]: Free scroll-bar shadow colors when the background color changes. (Fx_create_frame, x_create_tip_frame) [USE_TOOLKIT_SCROLL_BARS]: Initialize scroll-bar shadow-color fields. --- diff --git a/src/xfns.c b/src/xfns.c index 2273c6d223e..338a8781d28 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -2167,6 +2167,20 @@ x_set_scroll_bar_background (f, value, oldval) if (f->output_data.x->scroll_bar_background_pixel != -1) unload_color (f, f->output_data.x->scroll_bar_background_pixel); +#ifdef USE_TOOLKIT_SCROLL_BARS + /* Scrollbar shadow colors. */ + if (f->output_data.x->scroll_bar_top_shadow_pixel != -1) + { + unload_color (f, f->output_data.x->scroll_bar_top_shadow_pixel); + f->output_data.x->scroll_bar_top_shadow_pixel = -1; + } + if (f->output_data.x->scroll_bar_bottom_shadow_pixel != -1) + { + unload_color (f, f->output_data.x->scroll_bar_bottom_shadow_pixel); + f->output_data.x->scroll_bar_bottom_shadow_pixel = -1; + } +#endif /* USE_TOOLKIT_SCROLL_BARS */ + f->output_data.x->scroll_bar_background_pixel = pixel; if (FRAME_X_WINDOW (f) && FRAME_VISIBLE_P (f)) { @@ -4167,6 +4181,10 @@ This function is an internal primitive--use `make-frame' instead.") f->output_data.x->fontset = -1; f->output_data.x->scroll_bar_foreground_pixel = -1; f->output_data.x->scroll_bar_background_pixel = -1; +#ifdef USE_TOOLKIT_SCROLL_BARS + f->output_data.x->scroll_bar_top_shadow_pixel = -1; + f->output_data.x->scroll_bar_bottom_shadow_pixel = -1; +#endif /* USE_TOOLKIT_SCROLL_BARS */ record_unwind_protect (unwind_create_frame, frame); f->icon_name @@ -10622,6 +10640,10 @@ x_create_tip_frame (dpyinfo, parms, text) f->output_data.x->fontset = -1; f->output_data.x->scroll_bar_foreground_pixel = -1; f->output_data.x->scroll_bar_background_pixel = -1; +#ifdef USE_TOOLKIT_SCROLL_BARS + f->output_data.x->scroll_bar_top_shadow_pixel = -1; + f->output_data.x->scroll_bar_bottom_shadow_pixel = -1; +#endif /* USE_TOOLKIT_SCROLL_BARS */ f->icon_name = Qnil; FRAME_X_DISPLAY_INFO (f) = dpyinfo; #if GLYPH_DEBUG