summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Isorce <julien.isorce@collabora.co.uk>2013-08-16 16:29:12 +0100
committerJulien Isorce <julien.isorce@collabora.co.uk>2013-08-16 16:29:12 +0100
commit39a606f6553a653a3e08a21a905825467fff6812 (patch)
tree4627088a3ae814be16ee335f9c0eda8227a28d06
parent960f3e84e29d6b2179d2ef631b2d5ccd4cee157d (diff)
glwindow/x11: remove X11EventSource as soon as the window is deleted
gst_gl_window_x11_send_message do not use XSendEvent anymore
-rw-r--r--gst-libs/gst/gl/x11/gstglwindow_x11.c7
-rw-r--r--gst-libs/gst/gl/x11/x11_event_source.c6
2 files changed, 9 insertions, 4 deletions
diff --git a/gst-libs/gst/gl/x11/gstglwindow_x11.c b/gst-libs/gst/gl/x11/gstglwindow_x11.c
index a4f8a2c..cf5d241 100644
--- a/gst-libs/gst/gl/x11/gstglwindow_x11.c
+++ b/gst-libs/gst/gl/x11/gstglwindow_x11.c
@@ -634,12 +634,14 @@ gst_gl_window_x11_run (GstGLWindow * window)
g_main_loop_run (window_x11->loop);
}
-void
+gboolean
gst_gl_window_x11_handle_event (GstGLWindowX11 * window_x11)
{
GstGLWindow *window;
GstGLWindowX11Class *window_class;
+ gboolean ret = TRUE;
+
window = GST_GL_WINDOW (window_x11);
window_class = GST_GL_WINDOW_X11_GET_CLASS (window_x11);
@@ -667,6 +669,8 @@ gst_gl_window_x11_handle_event (GstGLWindowX11 * window_x11)
if (window->close)
window->close (window->close_data);
+
+ ret = FALSE;
}
break;
}
@@ -721,6 +725,7 @@ gst_gl_window_x11_handle_event (GstGLWindowX11 * window_x11)
} // switch
} // while running
+ return ret;
}
/* Not called by the gl thread */
diff --git a/gst-libs/gst/gl/x11/x11_event_source.c b/gst-libs/gst/gl/x11/x11_event_source.c
index f594383..0d83776 100644
--- a/gst-libs/gst/gl/x11/x11_event_source.c
+++ b/gst-libs/gst/gl/x11/x11_event_source.c
@@ -27,7 +27,7 @@
#include "x11_event_source.h"
-extern void gst_gl_window_x11_handle_event (GstGLWindowX11 * window_x11);
+extern gboolean gst_gl_window_x11_handle_event (GstGLWindowX11 * window_x11);
typedef struct _X11EventSource
{
@@ -66,12 +66,12 @@ x11_event_source_dispatch (GSource * base, GSourceFunc callback, gpointer data)
{
X11EventSource *source = (X11EventSource *) base;
- gst_gl_window_x11_handle_event (source->window);
+ gboolean ret = gst_gl_window_x11_handle_event (source->window);
if (callback)
callback (data);
- return TRUE;
+ return ret;
}
static GSourceFuncs x11_event_source_funcs = {