Re: How can I get the default X display depth?
- From: Federico Mena Quintero <federico ximian com>
- To: "simon.zheng" <Simon Zheng Sun COM>
- Cc: evo-dev Sun COM, GNOME Desktop Hackers <desktop-devel-list gnome org>
- Subject: Re: How can I get the default X display depth?
- Date: Mon, 04 Sep 2006 13:13:35 -0500
On Fri, 2006-09-01 at 19:32 +0800, simon.zheng wrote:
> I failed to get display depth by gdk_rgb_get_visual().
>
> 1. I set my X display as depth 8.
> #xdypinfo | grep depth
> depth of root window: 8 planes
>
> 2.Then, I create a new pixmap on 8-bit using the code,
> pixmap = gdk_pixmap_new (drawable, width, height,
> gdk_rgb_get_visual()->depth);
>
> Strangely, I find the value returned by gdk_rgb_get_visual()->depth is
> always 24, NOT 8. I'm using gnome 2.6 and gtk+-2.4.9 on solaris. Who
> know how can I get correct default depth?
You want to use gdk_screen_get_system_visual() and then visual->depth.
Federico
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]