mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
glwindow: Fix glimagesink cannot show frame when connect to qmlglsrc
When connect to qmlglsrc, x11 event loop will be replace by qt event loop which will cause the window cannot receive event from xserver, such as resize https://bugzilla.gnome.org/show_bug.cgi?id=768160
This commit is contained in:
parent
d875e0a727
commit
4cd94ddd25
1 changed files with 9 additions and 5 deletions
|
@ -391,6 +391,7 @@ draw_cb (gpointer data)
|
||||||
GstGLWindow *window = GST_GL_WINDOW (window_x11);
|
GstGLWindow *window = GST_GL_WINDOW (window_x11);
|
||||||
|
|
||||||
if (gst_gl_window_is_running (window)) {
|
if (gst_gl_window_is_running (window)) {
|
||||||
|
guint width, height;
|
||||||
XWindowAttributes attr;
|
XWindowAttributes attr;
|
||||||
|
|
||||||
XGetWindowAttributes (window_x11->device, window_x11->internal_win_id,
|
XGetWindowAttributes (window_x11->device, window_x11->internal_win_id,
|
||||||
|
@ -414,14 +415,17 @@ draw_cb (gpointer data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window_x11->allow_extra_expose_events) {
|
|
||||||
if (window->queue_resize) {
|
|
||||||
guint width, height;
|
|
||||||
|
|
||||||
gst_gl_window_get_surface_dimensions (window, &width, &height);
|
gst_gl_window_get_surface_dimensions (window, &width, &height);
|
||||||
gst_gl_window_resize (window, width, height);
|
if (attr.width != width || attr.height != height) {
|
||||||
|
width = attr.width;
|
||||||
|
height = attr.height;
|
||||||
|
gst_gl_window_queue_resize (window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (window_x11->allow_extra_expose_events) {
|
||||||
|
if (window->queue_resize)
|
||||||
|
gst_gl_window_resize (window, width, height);
|
||||||
|
|
||||||
if (window->draw) {
|
if (window->draw) {
|
||||||
GstGLContext *context = gst_gl_window_get_context (window);
|
GstGLContext *context = gst_gl_window_get_context (window);
|
||||||
GstGLContextClass *context_class = GST_GL_CONTEXT_GET_CLASS (context);
|
GstGLContextClass *context_class = GST_GL_CONTEXT_GET_CLASS (context);
|
||||||
|
|
Loading…
Reference in a new issue