diff options
author | Pekka Paalanen <pekka.paalanen@collabora.com> | 2019-02-06 10:44:37 +0200 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2019-02-06 10:58:22 +0000 |
commit | 052032d7306ca745670547870dfe0bdce65647af (patch) | |
tree | cb6511b3b82b2678b6bfeaa5d7ebdf9a08488352 | |
parent | 6e229ca26381bc8191fd9af1e439c311da709aff (diff) |
desktop-shell: use weston_compositor_exit
Use the proper weston_compositor_exit API instead of wl_display_terminate() to
allow the compositor main to prepare for exit, and most importantly to set the
exit error code as appropriate.
I have some brokenness in my test suite running, and weston-desktop-shell was
crashing at start, yet the tests did not notice. With this patch, the tests
where the helper crashes are properly marked as failed.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-rw-r--r-- | desktop-shell/shell.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 2d6d7c20..809f31c8 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -3536,7 +3536,7 @@ terminate_binding(struct weston_keyboard *keyboard, const struct timespec *time, { struct weston_compositor *compositor = data; - wl_display_terminate(compositor->wl_display); + weston_compositor_exit(compositor); } static void @@ -4289,7 +4289,8 @@ check_desktop_shell_crash_too_early(struct desktop_shell *shell) weston_log("Error: %s apparently cannot run at all.\n", shell->client); weston_log_continue(STAMP_SPACE "Quitting..."); - wl_display_terminate(shell->compositor->wl_display); + weston_compositor_exit_with_code(shell->compositor, + EXIT_FAILURE); return true; } |