Don't quit if xwayland not found

This commit is contained in:
Krsna Mahapatra 2022-07-11 16:23:55 -04:00
parent f1ba0a89fc
commit f21b20112c

View file

@ -397,8 +397,8 @@ server_init(struct server *server)
wlr_xwayland_create(server->wl_display, compositor, true); wlr_xwayland_create(server->wl_display, compositor, true);
if (!server->xwayland) { if (!server->xwayland) {
wlr_log(WLR_ERROR, "cannot create xwayland server"); wlr_log(WLR_ERROR, "cannot create xwayland server");
exit(EXIT_FAILURE); // exit(EXIT_FAILURE);
} } else {
server->new_xwayland_surface.notify = xwayland_surface_new; server->new_xwayland_surface.notify = xwayland_surface_new;
wl_signal_add(&server->xwayland->events.new_surface, wl_signal_add(&server->xwayland->events.new_surface,
&server->new_xwayland_surface); &server->new_xwayland_surface);
@ -409,13 +409,7 @@ server_init(struct server *server)
wlr_log(WLR_DEBUG, "xwayland is running on display %s", wlr_log(WLR_DEBUG, "xwayland is running on display %s",
server->xwayland->display_name); server->xwayland->display_name);
} }
#endif
if (!wlr_xcursor_manager_load(server->seat.xcursor_manager, 1)) {
wlr_log(WLR_ERROR, "cannot load xcursor theme");
}
#if HAVE_XWAYLAND
struct wlr_xcursor *xcursor; struct wlr_xcursor *xcursor;
xcursor = wlr_xcursor_manager_get_xcursor(server->seat.xcursor_manager, xcursor = wlr_xcursor_manager_get_xcursor(server->seat.xcursor_manager,
XCURSOR_DEFAULT, 1); XCURSOR_DEFAULT, 1);
@ -426,8 +420,13 @@ server_init(struct server *server)
image->height, image->hotspot_x, image->height, image->hotspot_x,
image->hotspot_y); image->hotspot_y);
} }
}
#endif #endif
if (!wlr_xcursor_manager_load(server->seat.xcursor_manager, 1)) {
wlr_log(WLR_ERROR, "cannot load xcursor theme");
}
/* used when handling SIGHUP */ /* used when handling SIGHUP */
g_server = server; g_server = server;
} }
@ -459,7 +458,9 @@ server_start(struct server *server)
} }
#if HAVE_XWAYLAND #if HAVE_XWAYLAND
if (server->xwayland) {
wlr_xwayland_set_seat(server->xwayland, server->seat.seat); wlr_xwayland_set_seat(server->xwayland, server->seat.seat);
}
#endif #endif
} }