diff options
author | Tudor Brindus <me@tbrindus.ca> | 2020-05-27 12:48:07 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-05-27 18:58:23 +0200 |
commit | 704d675a36811bdf3de5c95d5e0e7ce2b57b3157 (patch) | |
tree | d17475927b2ae46864a1dbecef1b5420bad3f1e4 /sway | |
parent | input/cursor: keep reference to cursor in constraint (diff) | |
download | sway-704d675a36811bdf3de5c95d5e0e7ce2b57b3157.tar.gz sway-704d675a36811bdf3de5c95d5e0e7ce2b57b3157.tar.zst sway-704d675a36811bdf3de5c95d5e0e7ce2b57b3157.zip |
Log Xwayland startup failures
Though unlikely, this commit makes server initialization totally
explicit in the logs.
Diffstat (limited to 'sway')
-rw-r--r-- | sway/server.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/sway/server.c b/sway/server.c index ec30430c..cf36962b 100644 --- a/sway/server.c +++ b/sway/server.c | |||
@@ -196,16 +196,20 @@ bool server_start(struct sway_server *server) { | |||
196 | server->xwayland.wlr_xwayland = | 196 | server->xwayland.wlr_xwayland = |
197 | wlr_xwayland_create(server->wl_display, server->compositor, | 197 | wlr_xwayland_create(server->wl_display, server->compositor, |
198 | config->xwayland == XWAYLAND_MODE_LAZY); | 198 | config->xwayland == XWAYLAND_MODE_LAZY); |
199 | wl_signal_add(&server->xwayland.wlr_xwayland->events.new_surface, | 199 | if (!server->xwayland.wlr_xwayland) { |
200 | &server->xwayland_surface); | 200 | sway_log(SWAY_ERROR, "Failed to start Xwayland"); |
201 | server->xwayland_surface.notify = handle_xwayland_surface; | 201 | } else { |
202 | wl_signal_add(&server->xwayland.wlr_xwayland->events.ready, | 202 | wl_signal_add(&server->xwayland.wlr_xwayland->events.new_surface, |
203 | &server->xwayland_ready); | 203 | &server->xwayland_surface); |
204 | server->xwayland_ready.notify = handle_xwayland_ready; | 204 | server->xwayland_surface.notify = handle_xwayland_surface; |
205 | 205 | wl_signal_add(&server->xwayland.wlr_xwayland->events.ready, | |
206 | setenv("DISPLAY", server->xwayland.wlr_xwayland->display_name, true); | 206 | &server->xwayland_ready); |
207 | 207 | server->xwayland_ready.notify = handle_xwayland_ready; | |
208 | /* xcursor configured by the default seat */ | 208 | |
209 | setenv("DISPLAY", server->xwayland.wlr_xwayland->display_name, true); | ||
210 | |||
211 | /* xcursor configured by the default seat */ | ||
212 | } | ||
209 | } | 213 | } |
210 | #endif | 214 | #endif |
211 | 215 | ||