mirror of
https://github.com/labwc/labwc.git
synced 2026-04-07 08:21:20 -04:00
Handle xwayland not started (when HAVE_XWAYLAND, but lacking the binary)
Closes https://github.com/labwc/labwc/issues/434
This commit is contained in:
parent
9903331995
commit
2338eb3f8b
5 changed files with 37 additions and 14 deletions
|
|
@ -1218,8 +1218,9 @@ xwayland_server_init(struct wlr_compositor *compositor)
|
|||
wlr_xwayland_create(server.wl_display,
|
||||
compositor, /* lazy */ !rc.xwayland_persistence);
|
||||
if (!server.xwayland) {
|
||||
wlr_log(WLR_ERROR, "cannot create xwayland server");
|
||||
exit(EXIT_FAILURE);
|
||||
wlr_log(WLR_ERROR, "failed to create xwayland server, continuing without");
|
||||
unsetenv("DISPLAY");
|
||||
return;
|
||||
}
|
||||
server.xwayland_new_surface.notify = handle_new_surface;
|
||||
wl_signal_add(&server.xwayland->events.new_surface,
|
||||
|
|
@ -1308,6 +1309,11 @@ void
|
|||
xwayland_server_finish(void)
|
||||
{
|
||||
struct wlr_xwayland *xwayland = server.xwayland;
|
||||
|
||||
if (!xwayland) {
|
||||
return;
|
||||
}
|
||||
|
||||
wl_list_remove(&server.xwayland_new_surface.link);
|
||||
wl_list_remove(&server.xwayland_server_ready.link);
|
||||
wl_list_remove(&server.xwayland_xwm_ready.link);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue