Log Xwayland startup failures

Though unlikely, this commit makes server initialization totally
explicit in the logs.
This commit is contained in:
Tudor Brindus 2020-05-27 12:48:07 -04:00 committed by Simon Ser
parent d71fed95da
commit 704d675a36

View file

@ -196,6 +196,9 @@ bool server_start(struct sway_server *server) {
server->xwayland.wlr_xwayland = server->xwayland.wlr_xwayland =
wlr_xwayland_create(server->wl_display, server->compositor, wlr_xwayland_create(server->wl_display, server->compositor,
config->xwayland == XWAYLAND_MODE_LAZY); config->xwayland == XWAYLAND_MODE_LAZY);
if (!server->xwayland.wlr_xwayland) {
sway_log(SWAY_ERROR, "Failed to start Xwayland");
} else {
wl_signal_add(&server->xwayland.wlr_xwayland->events.new_surface, wl_signal_add(&server->xwayland.wlr_xwayland->events.new_surface,
&server->xwayland_surface); &server->xwayland_surface);
server->xwayland_surface.notify = handle_xwayland_surface; server->xwayland_surface.notify = handle_xwayland_surface;
@ -207,6 +210,7 @@ bool server_start(struct sway_server *server) {
/* xcursor configured by the default seat */ /* xcursor configured by the default seat */
} }
}
#endif #endif
sway_log(SWAY_INFO, "Starting backend on wayland display '%s'", sway_log(SWAY_INFO, "Starting backend on wayland display '%s'",