gl/wayland: fix glib mainloop integration
authorLucas Stach <l.stach@pengutronix.de>
Fri, 8 Mar 2019 18:52:25 +0000 (19:52 +0100)
committerLucas Stach <l.stach@pengutronix.de>
Mon, 11 Mar 2019 12:54:16 +0000 (13:54 +0100)
commitc71dd72b21ab206da2fc2efb1513fd1bb02922a6
treecdefb0ea7c3e94b64d7b4d393d65b4f0ea497b42
parenteed2e9d52bed70b3faae371c6b9c829c7c925b7d
gl/wayland: fix glib mainloop integration

Implement the prepare and check functions according to the
documentation by returning TRUE when events should be dispatched
via the dispatch function.

As wl_display_read_events never blocks we can call it unconditionally
without looking at the poll status.

This simplifies the implementation and gets rid of a race where the
mainloop could get blocked due to nobody actually reading the events
from the wayland connection.
gst-libs/gst/gl/wayland/wayland_event_source.c