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


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?

Thank you in advance and sorry for generating so much traffic, lg Clemens

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