mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 11:55:39 +00:00
examples: use Gtk+-2.18 API conditionally
so the seek example and colorkey test work with older Gtk+ versions as well. Fixes #605960.
This commit is contained in:
parent
7388401f93
commit
fe970cb856
2 changed files with 4 additions and 0 deletions
|
@ -2438,10 +2438,12 @@ handle_expose_cb (GtkWidget * widget, GdkEventExpose * event, gpointer data)
|
|||
static void
|
||||
realize_cb (GtkWidget * widget, gpointer data)
|
||||
{
|
||||
#if GTK_CHECK_VERSION(2,18,0)
|
||||
/* This is here just for pedagogical purposes, GDK_WINDOW_XID will call it
|
||||
* as well */
|
||||
if (!gdk_window_ensure_native (widget->window))
|
||||
g_error ("Couldn't create native window needed for GstXOverlay!");
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_X
|
||||
embed_xid = GDK_WINDOW_XID (video_window->window);
|
||||
|
|
|
@ -81,10 +81,12 @@ handle_expose_cb (GtkWidget * widget, GdkEventExpose * event, gpointer data)
|
|||
static void
|
||||
realize_cb (GtkWidget * widget, gpointer data)
|
||||
{
|
||||
#if GTK_CHECK_VERSION(2,18,0)
|
||||
/* This is here just for pedagogical purposes, GDK_WINDOW_XID will call it
|
||||
* as well */
|
||||
if (!gdk_window_ensure_native (widget->window))
|
||||
g_error ("Couldn't create native window needed for GstXOverlay!");
|
||||
#endif
|
||||
|
||||
embed_xid = GDK_WINDOW_XID (video_window->window);
|
||||
g_print ("Window realize: got XID %lu\n", embed_xid);
|
||||
|
|
Loading…
Reference in a new issue