mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-25 15:36:42 +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);
|
g_main_loop_run (window_x11->loop);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
gboolean
|
||||||
gst_gl_window_x11_handle_event (GstGLWindowX11 * window_x11)
|
gst_gl_window_x11_handle_event (GstGLWindowX11 * window_x11)
|
||||||
{
|
{
|
||||||
GstGLWindow *window;
|
GstGLWindow *window;
|
||||||
GstGLWindowX11Class *window_class;
|
GstGLWindowX11Class *window_class;
|
||||||
|
|
||||||
|
gboolean ret = TRUE;
|
||||||
|
|
||||||
window = GST_GL_WINDOW (window_x11);
|
window = GST_GL_WINDOW (window_x11);
|
||||||
window_class = GST_GL_WINDOW_X11_GET_CLASS (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)
|
if (window->close)
|
||||||
window->close (window->close_data);
|
window->close (window->close_data);
|
||||||
|
|
||||||
|
ret = FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -721,6 +725,7 @@ gst_gl_window_x11_handle_event (GstGLWindowX11 * window_x11)
|
||||||
} // switch
|
} // switch
|
||||||
} // while running
|
} // while running
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Not called by the gl thread */
|
/* Not called by the gl thread */
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
#include "x11_event_source.h"
|
#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
|
typedef struct _X11EventSource
|
||||||
{
|
{
|
||||||
|
@ -66,12 +66,12 @@ x11_event_source_dispatch (GSource * base, GSourceFunc callback, gpointer data)
|
||||||
{
|
{
|
||||||
X11EventSource *source = (X11EventSource *) base;
|
X11EventSource *source = (X11EventSource *) base;
|
||||||
|
|
||||||
gst_gl_window_x11_handle_event (source->window);
|
gboolean ret = gst_gl_window_x11_handle_event (source->window);
|
||||||
|
|
||||||
if (callback)
|
if (callback)
|
||||||
callback (data);
|
callback (data);
|
||||||
|
|
||||||
return TRUE;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GSourceFuncs x11_event_source_funcs = {
|
static GSourceFuncs x11_event_source_funcs = {
|
||||||
|
|
Loading…
Reference in a new issue