Fail verbosely if we can't talk to wayland

Useful when mistakenly run in X
pull/12/head
Daniel Lublin 2022-06-30 11:26:06 +02:00 committed by Andri Yngvason
parent 83886345b1
commit 0ea00b45ef
1 changed files with 3 additions and 1 deletions

View File

@ -762,8 +762,10 @@ int main(int argc, char* argv[])
goto signal_handler_failure; goto signal_handler_failure;
wl_display = wl_display_connect(NULL); wl_display = wl_display_connect(NULL);
if (!wl_display) if (!wl_display) {
fprintf(stderr, "Failed to connect to local wayland display\n");
goto display_failure; goto display_failure;
}
if (init_wayland_event_handler() < 0) if (init_wayland_event_handler() < 0)
goto event_handler_failure; goto event_handler_failure;