examples: Call gst_ensure_native_window() for gst-camera

Fixes spurious SEGVs due to multithreading conflicts in
client-side-window Gtk versions.
This commit is contained in:
Benjamin Otte 2010-02-14 15:22:05 +01:00
parent a04c2db340
commit e54cbf7850
2 changed files with 9 additions and 0 deletions

View file

@ -832,6 +832,14 @@ on_buttonPause_clicked (GtkButton * button, gpointer user_data)
}
}
void
on_drawingareaView_realize (GtkWidget * widget, gpointer data)
{
#if GTK_CHECK_VERSION (2, 18, 0)
gdk_window_ensure_native (widget->window);
#endif
}
gboolean
on_drawingareaView_configure_event (GtkWidget * widget,
GdkEventConfigure * event, gpointer data)

View file

@ -374,6 +374,7 @@
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<signal name="configure_event" handler="on_drawingareaView_configure_event"/>
<signal name="realize" handler="on_drawingareaView_realize"/>
</object>
</child>
</object>