changeset 32606:78b4e9f31087

(x_to_xcolors, x_set_mouse_color, lookup_pixel_color) (x_to_xcolors, png_load): Use x_query_color.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 18 Oct 2000 11:57:35 +0000
parents 9da8bac6f2bd
children 00d2748a616a
files src/xfns.c
diffstat 1 files changed, 7 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfns.c	Wed Oct 18 11:51:24 2000 +0000
+++ b/src/xfns.c	Wed Oct 18 11:57:35 2000 +0000
@@ -1506,11 +1506,10 @@
     XColor fore_color, back_color;
 
     fore_color.pixel = f->output_data.x->mouse_pixel;
+    x_query_color (f, &fore_color);
     back_color.pixel = mask_color;
-    XQueryColor (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f),
-		 &fore_color);
-    XQueryColor (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f),
-		 &back_color);
+    x_query_color (f, &back_color);
+    
     XRecolorCursor (FRAME_X_DISPLAY (f), cursor,
 		    &fore_color, &back_color);
     XRecolorCursor (FRAME_X_DISPLAY (f), nontext_cursor,
@@ -1518,7 +1517,7 @@
     XRecolorCursor (FRAME_X_DISPLAY (f), mode_cursor,
 		    &fore_color, &back_color);
     XRecolorCursor (FRAME_X_DISPLAY (f), cross_cursor,
-                    &fore_color, &back_color);
+		    &fore_color, &back_color);
     XRecolorCursor (FRAME_X_DISPLAY (f), busy_cursor,
                     &fore_color, &back_color);
   }
@@ -7398,7 +7397,7 @@
 
       cmap = FRAME_X_COLORMAP (f);
       color.pixel = pixel;
-      XQueryColor (FRAME_X_DISPLAY (f), cmap, &color);
+      x_query_color (f, &color);
       rc = x_alloc_nearest_color (f, cmap, &color);
 
       if (rc)
@@ -7526,8 +7525,7 @@
 	p->pixel = XGetPixel (ximg, x, y);
 
       if (rgb_p)
-	XQueryColors (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f),
-		      row, img->width);
+	x_query_colors (f, row, img->width);
     }
 
   XDestroyImage (ximg);
@@ -8541,7 +8539,7 @@
 
 	  cmap = FRAME_X_COLORMAP (f);
 	  color.pixel = FRAME_BACKGROUND_PIXEL (f);
-	  XQueryColor (FRAME_X_DISPLAY (f), cmap, &color);
+	  x_query_color (f, &color);
 
 	  bzero (&frame_background, sizeof frame_background);
 	  frame_background.red = color.red;