[791/906] glwindow/x11: remove X11EventSource as soon as the window is deleted

gst_gl_window_x11_send_message do not use XSendEvent anymore
This commit is contained in:
Julien Isorce 2013-08-16 16:29:12 +01:00 committed by Matthew Waters
parent 44d82d6aad
commit bfac5a8d76
2 changed files with 9 additions and 4 deletions

View file

@ -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 */

View file

@ -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 = {