aboutsummaryrefslogtreecommitdiff
path: root/xwayland/xwayland.c
diff options
context:
space:
mode:
authorVincent Vanlaer <vincent.vanlaer@skynet.be>2018-05-07 00:43:26 +0200
committerVincent Vanlaer <vincent.vanlaer@skynet.be>2018-05-07 00:43:26 +0200
commit446ea3a3408e2d735aaa77059745f82943bc67d2 (patch)
tree8a5f52785071df328fedc55abc2d5aeea2b45dd9 /xwayland/xwayland.c
parentdbf4f9a2312c378b855db68f18b922e73c746887 (diff)
Add beter handling for Xwayland failing at startup
Diffstat (limited to 'xwayland/xwayland.c')
-rw-r--r--xwayland/xwayland.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/xwayland/xwayland.c b/xwayland/xwayland.c
index fd5309ad..d70795e4 100644
--- a/xwayland/xwayland.c
+++ b/xwayland/xwayland.c
@@ -178,17 +178,25 @@ static void handle_client_destroy(struct wl_listener *listener, void *data) {
struct wlr_xwayland *wlr_xwayland =
wl_container_of(listener, wlr_xwayland, client_destroy);
+ if (wlr_xwayland->sigusr1_source) {
+ // Xwayland failed to start, let the sigusr1 handler deal with it
+ return;
+ }
+
// Don't call client destroy: it's being destroyed already
wlr_xwayland->client = NULL;
wl_list_remove(&wlr_xwayland->client_destroy.link);
xwayland_finish_server(wlr_xwayland);
- if (wlr_xwayland->lazy) {
- xwayland_start_server_lazy(wlr_xwayland);
- } else if (time(NULL) - wlr_xwayland->server_start > 5) {
- wlr_log(L_INFO, "Restarting Xwayland");
- xwayland_start_server(wlr_xwayland);
+ if (time(NULL) - wlr_xwayland->server_start > 5) {
+ if (wlr_xwayland->lazy) {
+ wlr_log(L_INFO, "Restarting Xwayland (lazy)");
+ xwayland_start_server_lazy(wlr_xwayland);
+ } else {
+ wlr_log(L_INFO, "Restarting Xwayland");
+ xwayland_start_server(wlr_xwayland);
+ }
}
}