|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
I am currently maintaining gtkdatabox. It is a nice data plotting package which is tightly integrated with GTK.
I am having problems with the 'realize' GTK function.
When a previously 'unrealize' pixmap is addressed, I get seg fault.
The chain flow goes like this :
Add a reference to the widget the pack in a container.
Remove the widget from a container.
(it gets unrealized)
Pack the widget back into the container.
(the realize function is called and in this function it dies)
It dies when calling the 'gdk_pixmap_get_size' function as the pixmap appears not to be valid.
I can't work out how to check whether the pixmap is valid before I call this function.
the code can be obtained from here :
the offending code is in the file gtkdatabox_ruler.c :
gtk_databox_ruler_make_pixmap (GtkDataboxRuler * ruler)
widget = GTK_WIDGET (ruler);
gdk_pixmap_get_size (ruler->priv->backing_pixmap, &width, &height);
if ((width == widget->allocation.width) &&
(height == widget->allocation.height))
ruler->priv->backing_pixmap = gdk_pixmap_new (widget->window,
ruler->priv->xsrc = 0;
ruler->priv->ysrc = 0;
_______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list