Re: [GTK +] Problem with Pixmap



On Wed, 07 Mar 2001, Paul Davis wrote:
> >Hi Cyril, the problem is that your top_level_window is not realised when
> >you call gdk_pixmap_create_from_xpm(), so it has no underlying X window
> >yet, and no colormap.
> >
> >I get around this problem by having an invisible top-level window for my
> >application. In main(), just after gtk_init(), I do:
> 
> As the FAQ should say (but probably doesn't), use
> 
>    gdk_pixmap_colormap_new_from_xpm()

I think you mean 
	gdk_pixmap_colormap_create_from_xpm,
at least I couldn't find
	gdk_pixmap_colormap_new_from_xpm
anywhere in the source...

> with the system colormap.
> 
> it doesn't need a window. We are all calmly assuming that 1.3/2.0
> removes this confusion from the API :)

Thanks much for your pointer -- it's much cleaner than having to get global 
access to a top-level window :-(

--
George Young,  Rm. L-204		gry ll mit edu
MIT Lincoln Laboratory
244 Wood St.
Lexington, Massachusetts  02420-9108	(781) 981-2756




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