client: Add mediated reader stopping for display proxy

Add display API for negotiated display event reader's early exits.

Closes #28

This patch allows display event readers to exit their polling and
processing loops early based on when something calls wl_display_stop.

TODO: There is still a potential issue of new threads starting
after wl_display_stop has returned, which would need a more
significant change to give the display API control of the
display pointer, and check whether it is nulled before dereferencing
throughout the current API.

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
This commit is contained in:
Robert Beckett 2019-04-16 17:12:06 +01:00
parent 6d44973710
commit 35f1689aa1
3 changed files with 269 additions and 9 deletions

View file

@ -216,6 +216,12 @@ wl_display_disconnect(struct wl_display *display);
int
wl_display_get_fd(struct wl_display *display);
int
wl_display_get_stop_fd(struct wl_display *display);
int
wl_display_stop(struct wl_display *display, int wait_readers);
int
wl_display_dispatch(struct wl_display *display);