Re: [GTK +] Problem with Pixmap



>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()

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 :)

--p




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