mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
[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:
parent
4e8c78a4da
commit
b56bf26dce
2 changed files with 9 additions and 4 deletions
|
@ -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 */
|
||||
|
|
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue