Re: on DrawingArea, pixmap and pixbuf



> 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]