aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Djärv2009-10-19 18:08:53 +0000
committerJan Djärv2009-10-19 18:08:53 +0000
commit9685cef2dd1651a01796273632f28cac6ad4f3da (patch)
treec2241f2009aab750f9e619ce1e0c0a78a0e2974b
parentb024548b44eb4f174dcd880f19717c23f95943b2 (diff)
downloademacs-9685cef2dd1651a01796273632f28cac6ad4f3da.tar.gz
emacs-9685cef2dd1651a01796273632f28cac6ad4f3da.zip
(x_create_toolkit_scroll_bar): Don't allocate color for
pixel -1 (bug #4742).
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xterm.c25
2 files changed, 22 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b3f9d9f51cf..9519ac63d7c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12009-10-19 Jan Djärv <jan.h.d@swipnet.se>
2
3 * xterm.c (x_create_toolkit_scroll_bar): Don't allocate color for
4 pixel -1 (bug #4742).
5
12009-10-19 Dan Nicolaescu <dann@ics.uci.edu> 62009-10-19 Dan Nicolaescu <dann@ics.uci.edu>
2 7
3 * process.c (create_pty): Remove conditionals for no longer 8 * process.c (create_pty): Remove conditionals for no longer
diff --git a/src/xterm.c b/src/xterm.c
index 5a004873507..97bfd5b2292 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -4633,18 +4633,26 @@ x_create_toolkit_scroll_bar (f, bar)
4633 if (f->output_data.x->scroll_bar_top_shadow_pixel == -1) 4633 if (f->output_data.x->scroll_bar_top_shadow_pixel == -1)
4634 { 4634 {
4635 pixel = f->output_data.x->scroll_bar_background_pixel; 4635 pixel = f->output_data.x->scroll_bar_background_pixel;
4636 if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f), 4636 if (pixel != -1)
4637 &pixel, 1.2, 0x8000)) 4637 {
4638 pixel = -1; 4638 if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f),
4639 f->output_data.x->scroll_bar_top_shadow_pixel = pixel; 4639 FRAME_X_COLORMAP (f),
4640 &pixel, 1.2, 0x8000))
4641 pixel = -1;
4642 f->output_data.x->scroll_bar_top_shadow_pixel = pixel;
4643 }
4640 } 4644 }
4641 if (f->output_data.x->scroll_bar_bottom_shadow_pixel == -1) 4645 if (f->output_data.x->scroll_bar_bottom_shadow_pixel == -1)
4642 { 4646 {
4643 pixel = f->output_data.x->scroll_bar_background_pixel; 4647 pixel = f->output_data.x->scroll_bar_background_pixel;
4644 if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f), 4648 if (pixel != -1)
4645 &pixel, 0.6, 0x4000)) 4649 {
4646 pixel = -1; 4650 if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f),
4647 f->output_data.x->scroll_bar_bottom_shadow_pixel = pixel; 4651 FRAME_X_COLORMAP (f),
4652 &pixel, 0.6, 0x4000))
4653 pixel = -1;
4654 f->output_data.x->scroll_bar_bottom_shadow_pixel = pixel;
4655 }
4648 } 4656 }
4649 4657
4650#ifdef XtNbeNiceToColormap 4658#ifdef XtNbeNiceToColormap
@@ -10433,6 +10441,7 @@ x_term_init (display_name, xrm_option, resource_name)
10433 || !strcmp (SDATA (value), "on"))) 10441 || !strcmp (SDATA (value), "on")))
10434 XSynchronize (dpyinfo->display, True); 10442 XSynchronize (dpyinfo->display, True);
10435 } 10443 }
10444 XSynchronize (dpyinfo->display, True);
10436 10445
10437 { 10446 {
10438 Lisp_Object value; 10447 Lisp_Object value;