diff options
author | Julien Isorce <julien.isorce@collabora.co.uk> | 2013-11-06 21:59:27 +0000 |
---|---|---|
committer | Matthew Waters <ystreet00@gmail.com> | 2014-03-15 18:37:03 +0100 |
commit | d1376390ba4f6d40bcb11f25de0becdeb836ff3e (patch) | |
tree | f46368bd23364a24ba003e97aee6352a305d11d1 | |
parent | c775bf584bc894aa9a986c96447c8a6177c92667 (diff) |
[832/906] x11: ignore Expose events not initiated by gst_gl_window_draw
-rw-r--r-- | gst-libs/gst/gl/x11/gstglwindow_x11.c | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/gst-libs/gst/gl/x11/gstglwindow_x11.c b/gst-libs/gst/gl/x11/gstglwindow_x11.c index 705fe72e4..355513b39 100644 --- a/gst-libs/gst/gl/x11/gstglwindow_x11.c +++ b/gst-libs/gst/gl/x11/gstglwindow_x11.c @@ -645,6 +645,20 @@ gst_gl_window_x11_handle_event (GstGLWindowX11 * window_x11) break; case Expose: + /* non-zero means that other Expose follows + * so just wait for the last one + * in theory we should not receive non-zero because + * we have no sub areas here but just in case */ + if (event.xexpose.count != 0) { + break; + } + + /* just ignore request that does not come from us + * they are un-necessary and it overloads the drawer + */ + if (!event.xexpose.send_event) + break; + if (window->draw) { context = gst_gl_window_get_context (window); context_class = GST_GL_CONTEXT_GET_CLASS (context); @@ -657,28 +671,8 @@ gst_gl_window_x11_handle_event (GstGLWindowX11 * window_x11) break; case VisibilityNotify: - { - switch (event.xvisibility.state) { - case VisibilityUnobscured: - if (window->draw) - window->draw (window->draw_data); - break; - - case VisibilityPartiallyObscured: - if (window->draw) - window->draw (window->draw_data); - break; - - case VisibilityFullyObscured: - break; - - default: - GST_DEBUG ("unknown xvisibility event: %d", - event.xvisibility.state); - break; - } + /* actually nothing to do here */ break; - } default: GST_DEBUG ("unknown XEvent type: %u", event.type); |