Re: Should gdk_rgb_get_visual()->depth be display's depth?

On Sun, 2005-11-06 at 15:17 +0000, Clemens Eisserer wrote:
> Hello,
> some time ago I mailed because of problems I had with gnu-classpath
> running on my Nokia770. I thought the problem was because of pixmaps
> but now I found out that the problem is realted to the colormap which
> is requested from the pixmap.
> Gnu-Classpath uses more or less code like the following when creating
> an offscreen renderable image:
>  GdkPixmap* pix = gdk_pixmap_new (NULL, 10, 10, gdk_rgb_get_visual()->depth);
>  void* cm = gdk_drawable_get_colormap ((GdkDrawable *)pix);
> The problem lies in the fact that the 770's display runs in 16-bit
> depth mode whereas gdk_rgb_get_visual()->depth is 24. When requesting
> a colormap with   gdk_drawable_get_colormap  I always get back "0" -
> the same when creating a 16-bit pixmap on my 24-bit desktop machine.
> Should'nt gdk_rgb_get_visual()->depth be 16 when running on a 16-bit
> display as it is the case when runnig my desktop machine in 16-bit
> mode - or is it not correct to assume that creating a pixmap with
> dk_rgb_get_visual()->depth as depth may always work?

gdk_rgb_get_visual() will never return a visual that the display doesn't
claim to support. If the 770's X server is claiming to support 24 bit
visuals but doesn't that's an X server bug.

Still, I have a hard time believing that nobody would have noticed
gdk_rgb_get_visual() yet, so I think you should recheck your results.


Attachment: signature.asc
Description: This is a digitally signed message part

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