Re: on DrawingArea, pixmap and pixbuf
- From: Nuno Afonso <hunchback netcabo pt>
- To: David Eduardo Gomez Noguera <davidgn servidor unam mx>
- Cc: GTK-list <gtk-list gnome org>
- Subject: Re: on DrawingArea, pixmap and pixbuf
- Date: 20 Apr 2002 18:27:41 +0100
> My program creates the pixmap on the main() function, but when passing
> drawing_area->window, the compiled program tells of "Gdk-CRITICAL **:
> file gdkpixmap.c: line 62 (gdk_pixmap_new): assertion `(window != NULL)
> || (depth != -1)' failed.", so drawing_area->window is null.
> why does it happens? is it because its outside the gtk_main() thread?
> it doesnt happen if i pass mainwindow->window.
if you do
gtk_widget_realize(your_widget);
before the gdk_pixmap_new(your_widget->window,......) that warning will
not appear..
the reason because it's not appearing when you pass mainwindow->window
is because before you are calling gdk_pixmap_new() you are doing
gtk_widget_show(mainwindow);, wright? :-)
Afonso
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]