Re: drawing graphics



>When I run the application, the following messages are printed:
>
>Gdk-CRITICAL **: file gdkpixmap.c: line 62 (gdk_pixmap_new): assertion
>`(window != NULL) || (depth != -1)' failed.
>
>Gdk-CRITICAL **: file gdkwindow.c: line 1249 (gdk_window_set_back_pixmap):
>assertion `window != NULL' failed.
>
>
>Why? At which time is drawing_area->window initialised? Is it necessary to
>show the app window before initialising the pixmap?

after the "realize' signal emitted. personally, i prefer to use the
"map" signal for various reasons.

but you need your pixmap allocation code in a handler for "configure"
event anyway, since you have to resize the pixmap there if the window
is resized.

>(sorry for the newbie questions... it's my very first GTK app)

then i would write something that doesn't do stuff like this
first. its all an optimization anyway. get it working, then worry
about this level of things.



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