From 4a0f94cefafe49d392ca5dc163ee9344378d5627 Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Fri, 13 Aug 2021 16:49:31 +0300 Subject: [PATCH] simple-egl: Bail out if xdg-shell was not found We only support xdg-shell in simple-egl, so make it obvious. Signed-off-by: Marius Vlad --- clients/simple-egl.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/clients/simple-egl.c b/clients/simple-egl.c index cc60dde0..c7b46a7b 100644 --- a/clients/simple-egl.c +++ b/clients/simple-egl.c @@ -848,6 +848,11 @@ main(int argc, char **argv) wl_display_roundtrip(display.display); + if (!display.wm_base) { + fprintf(stderr, "xdg-shell support required. simple-egl exiting\n"); + goto out_no_xdg_shell; + } + init_egl(&display, &window); create_surface(&window); init_gl(&window); @@ -879,6 +884,7 @@ main(int argc, char **argv) fini_egl(&display); wl_surface_destroy(display.cursor_surface); +out_no_xdg_shell: if (display.cursor_theme) wl_cursor_theme_destroy(display.cursor_theme);