clients/simple-egl: Exit when display has an error

Check return values for wl_display_dispatch_* functions, so that
the program stops running when the compositor that it is connected
to crashes.

Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
This commit is contained in:
Manuel Stoeckl 2019-08-07 23:21:16 -04:00 committed by Simon Ser
parent 7216d4c44b
commit 324d846567

View file

@ -866,9 +866,9 @@ main(int argc, char **argv)
* queued up as a side effect. */
while (running && ret != -1) {
if (window.wait_for_configure) {
wl_display_dispatch(display.display);
ret = wl_display_dispatch(display.display);
} else {
wl_display_dispatch_pending(display.display);
ret = wl_display_dispatch_pending(display.display);
redraw(&window, NULL, 0);
}
}