Mercurial > emacs
changeset 105677:ecd13e4eaf2a
(x_create_toolkit_scroll_bar): Don't allocate color for
pixel -1 (bug #4742).
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Mon, 19 Oct 2009 18:08:53 +0000 |
parents | bb413968898a |
children | d46b7a138955 |
files | src/ChangeLog src/xterm.c |
diffstat | 2 files changed, 22 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Mon Oct 19 16:58:18 2009 +0000 +++ b/src/ChangeLog Mon Oct 19 18:08:53 2009 +0000 @@ -1,3 +1,8 @@ +2009-10-19 Jan Djärv <jan.h.d@swipnet.se> + + * xterm.c (x_create_toolkit_scroll_bar): Don't allocate color for + pixel -1 (bug #4742). + 2009-10-19 Dan Nicolaescu <dann@ics.uci.edu> * process.c (create_pty): Remove conditionals for no longer
--- a/src/xterm.c Mon Oct 19 16:58:18 2009 +0000 +++ b/src/xterm.c Mon Oct 19 18:08:53 2009 +0000 @@ -4633,18 +4633,26 @@ if (f->output_data.x->scroll_bar_top_shadow_pixel == -1) { pixel = f->output_data.x->scroll_bar_background_pixel; - if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f), - &pixel, 1.2, 0x8000)) - pixel = -1; - f->output_data.x->scroll_bar_top_shadow_pixel = pixel; + if (pixel != -1) + { + if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f), + FRAME_X_COLORMAP (f), + &pixel, 1.2, 0x8000)) + pixel = -1; + f->output_data.x->scroll_bar_top_shadow_pixel = pixel; + } } if (f->output_data.x->scroll_bar_bottom_shadow_pixel == -1) { pixel = f->output_data.x->scroll_bar_background_pixel; - if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f), - &pixel, 0.6, 0x4000)) - pixel = -1; - f->output_data.x->scroll_bar_bottom_shadow_pixel = pixel; + if (pixel != -1) + { + if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f), + FRAME_X_COLORMAP (f), + &pixel, 0.6, 0x4000)) + pixel = -1; + f->output_data.x->scroll_bar_bottom_shadow_pixel = pixel; + } } #ifdef XtNbeNiceToColormap @@ -10433,6 +10441,7 @@ || !strcmp (SDATA (value), "on"))) XSynchronize (dpyinfo->display, True); } + XSynchronize (dpyinfo->display, True); { Lisp_Object value;