On Tue, 2006-08-15 at 13:59 +0200, Daniel Haude wrote: > On Wed, 26 Jul 2006 06:41:38 +0200, Richard Boaz <[EMAIL PROTECTED]> wrote: > > > gtk_widget_queue_draw_area(DrawingArea, 0, 0, > > DrawingArea->allocation.width, DrawingArea->allocation.height); > > while (gtk_events_pending()) > > gtk_main_iteration(); > > } // end while > > What is the while loop for?
To process all pending events pending as pmap_expose needs the static pixbuf "alive" and it's unref'ed at the end of this function. But it's broken as the next expose event will get a pixbuf that may not exists as dispMap is storing a pointer to a gobject that have been destroyed. This scheme assumes that the expose event will only happen when you call queue_draw, but any overlapping of other application's window over this widget - among a myriad other causes - will need redraw to happen - thus the expose-event signal will be raised. You can get rid of this loop, and you must not destroy the pixbuf until the widget is destroyed. -- Iago Rubio _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list