Commit fe970cb8 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller
Browse files

examples: use Gtk+-2.18 API conditionally

so the seek example and colorkey test work with older Gtk+ versions
as well.

Fixes #605960.
parent 7388401f
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment