gl/window: attach the GMaincontext in window struct to GSource for X11 window
authorHaihua Hu <jared.hu@nxp.com>
Tue, 7 Feb 2017 16:45:32 +0000 (00:45 +0800)
committerMatthew Waters <matthew@centricular.com>
Thu, 9 Feb 2017 02:20:57 +0000 (13:20 +1100)
https://bugzilla.gnome.org/show_bug.cgi?id=778297

gst-libs/gst/gl/x11/gstglwindow_x11.c

index d08b757dca73ea808f48554b754755cb3e1b3bf0..91aa841c8515b73ba9b89f6fc47f6430fde2a032 100644 (file)
@@ -173,8 +173,7 @@ gst_gl_window_x11_open (GstGLWindow * window, GError ** error)
 
   if (!display_x11->foreign_display) {
     window_x11->x11_source = x11_event_source_new (window_x11);
-    g_source_attach (window_x11->x11_source,
-        g_main_context_get_thread_default ());
+    g_source_attach (window_x11->x11_source, window->main_context);
   }
 
   window_x11->allow_extra_expose_events = TRUE;