Mercurial > hg > xemacs-beta
diff src/redisplay-x.c @ 219:262b8bb4a523 r20-4b8
Import from CVS: tag r20-4b8
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:09:35 +0200 |
parents | d44af0c54775 |
children | e70b3a057e12 |
line wrap: on
line diff
--- a/src/redisplay-x.c Mon Aug 13 10:08:36 2007 +0200 +++ b/src/redisplay-x.c Mon Aug 13 10:09:35 2007 +0200 @@ -1701,8 +1701,8 @@ { struct device *d = XDEVICE (f->device); Display *dpy = DEVICE_X_DISPLAY (d); - Colormap cmap = - DefaultColormapOfScreen (XtScreen ((Widget) FRAME_X_TEXT_WIDGET (f))); + Colormap cmap = DEVICE_X_COLORMAP (d); + Visual *visual = DEVICE_X_VISUAL (d); XColor topc, botc; int top_frobbed = 0, bottom_frobbed = 0; @@ -1717,7 +1717,7 @@ topc.red = MINL (65535, (unsigned long) topc.red * 6 / 5); topc.green = MINL (65535, (unsigned long) topc.green * 6 / 5); topc.blue = MINL (65535, (unsigned long) topc.blue * 6 / 5); - if (allocate_nearest_color (dpy, cmap, &topc)) + if (allocate_nearest_color (dpy, cmap, visual, &topc)) { *top_shadow = topc.pixel; top_frobbed = 1; @@ -1733,7 +1733,7 @@ botc.red = (unsigned short) ((unsigned long) botc.red * 3 / 5); botc.green = (unsigned short) ((unsigned long) botc.green * 3 / 5); botc.blue = (unsigned short) ((unsigned long) botc.blue * 3 / 5); - if (allocate_nearest_color (dpy, cmap, &botc)) + if (allocate_nearest_color (dpy, cmap, visual, &botc)) { *bottom_shadow = botc.pixel; bottom_frobbed = 1;