emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lookup_rgb_color] Distorted colours


From: Gerd Moellmann
Subject: Re: [lookup_rgb_color] Distorted colours
Date: 30 Aug 2003 18:33:30 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Jesper Harder <address@hidden> writes:

> > Can you mail the output of xdpyinfo here?
>     available colormap entries:    64 per subfield
>     red, green, blue masks:    0xf800, 0x7e0, 0x1f
>     significant bits in color specification:    8 bits

Could you please try this patch:

--- xfns.c.~1.593.~     Thu Aug 28 14:28:24 2003
+++ xfns.c      Sat Aug 30 18:31:24 2003
@@ -6764,8 +6764,12 @@
   visual = FRAME_X_DISPLAY_INFO (f)->visual;
   if (visual->class == TrueColor)
     {
-      int bits = visual->bits_per_rgb;
+      int nentries = visual->map_entries;
+      int bits = 0;
       unsigned long pr, pg, pb;
+
+      while ((nentries & (1 << bits)) == 0)
+       ++bits;
 
       /* Apply gamma-correction like normal color allocation does.  */
       if (f->gamma)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]