Fix gtk_widget_add_tick_callback sometimes not working

We clear GtkTickCallbackInfo on creation to ensure all fields start
as 0. Before we sometimes ended up with destroyed being 1
so the tick was never called.
This commit is contained in:
Alexander Larsson 2013-02-15 15:46:33 +01:00
parent c6c33c5cd7
commit bbb981fd1a

View File

@ -4655,7 +4655,7 @@ gtk_widget_add_tick_callback (GtkWidget *widget,
GDK_FRAME_CLOCK_PHASE_UPDATE);
}
info = g_slice_new (GtkTickCallbackInfo);
info = g_slice_new0 (GtkTickCallbackInfo);
info->refcount = 1;
info->id = ++tick_callback_id;