]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_build_heuristic_mask): Use x_alloc_image_color.
authorGerd Moellmann <gerd@gnu.org>
Sun, 28 Oct 2001 20:59:58 +0000 (20:59 +0000)
committerGerd Moellmann <gerd@gnu.org>
Sun, 28 Oct 2001 20:59:58 +0000 (20:59 +0000)
src/ChangeLog
src/xfns.c

index 9bb59b9b2d4dde8c7b0f7af274d62a9a6112f57c..a04151c381f6bad3d3f55f1f3b9c72097dc3cab7 100644 (file)
@@ -1,5 +1,7 @@
 2001-10-28  Gerd Moellmann  <gerd@gnu.org>
 
+       * xfns.c (x_build_heuristic_mask): Use x_alloc_image_color.
+       
        * xfns.c (x_build_heuristic_mask): Fix a bug not incrementing
        a loop counter.
 
index 7f42c14b3b05cd42c051b333ef70186428d82fbb..6643cc288710d2dede887d44e9d9b18205c6200c 100644 (file)
@@ -8064,17 +8064,9 @@ x_build_heuristic_mask (f, img, how)
       if (i == 3 && NILP (how))
        {
          char color_name[30];
-         XColor exact, color;
-         Colormap cmap;
-
          sprintf (color_name, "#%04x%04x%04x", rgb[0], rgb[1], rgb[2]);
-         
-         cmap = FRAME_X_COLORMAP (f);
-         if (XLookupColor (dpy, cmap, color_name, &exact, &color))
-           {
-             bg = color.pixel;
-             look_at_corners_p = 0;
-           }
+         bg = x_alloc_image_color (f, img, build_string (color_name), 0);
+         look_at_corners_p = 0;
        }
     }