Cage: move xwayland check

This commit is contained in:
Jente Hidskes 2019-01-17 22:25:20 +01:00
parent 2c5b3c5ad0
commit 9b797fb98e
No known key found for this signature in database
GPG key ID: 04BE5A29F32D91EA

9
cage.c
View file

@ -183,6 +183,11 @@ main(int argc, char *argv[])
#if CAGE_HAS_XWAYLAND
xwayland = wlr_xwayland_create(server.wl_display, compositor, true);
if (!xwayland) {
wlr_log(WLR_ERROR, "Cannot create XWayland server");
ret = 1;
goto end;
}
server.new_xwayland_surface.notify = handle_xwayland_surface_new;
wl_signal_add(&xwayland->events.new_surface, &server.new_xwayland_surface);
@ -227,9 +232,7 @@ main(int argc, char *argv[])
}
#if CAGE_HAS_XWAYLAND
if (xwayland) {
wlr_xwayland_set_seat(xwayland, server.seat->seat);
}
wlr_xwayland_set_seat(xwayland, server.seat->seat);
#endif
pid_t pid;