Re: GdkImage->visual is NULL on win32
- From: Peter Zelezny <pzel dodo com au>
- To: gtk-devel-list gnome org
- Subject: Re: GdkImage->visual is NULL on win32
- Date: Thu, 28 Aug 2003 13:48:36 +1000
On Thu, 28 Aug 2003 02:31:35 +0000
Tor Lillqvist <tml iki fi> wrote:
> > It seems that GdkImages' "visual" field is now NULL on Windows
> > (starting from 2.2.3). Prevously I used this to find useful information
> > like RGB mask/shift. Is this an intentional change?
>
> Hmm, probably not. What API do you use to create the GdkImage? I do
> notice now that _gdk_win32_copy_to_image() always passes a NULL
> GdkVisual to _gdk_image_new_for_depth(). This probably is a bug. The
> corresponding function in the X11 backend uses
> gdk_drawable_get_visual().
>
> (But the _gdk_win32_copy_to_image() code was the same in GTK+ 2.2.1,
> too. But other things have changed related to GdkPixmaps and
> GdkImages, so without a sample program it's hard to say exactly how
> the changes have affected your code.)
I call gdk_image_get() on a GdkWindow. Something along the lines of:
gdk_window_get_size (win, &width, &height);
img = gdk_image_get (win, 0, 0, width, height);
img->visual is now NULL.
It's no problem calling gdk_drawable_get_visual(), but I suppose you'd
want to set ->visual to something for your binary builds to keep compatiblity.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]