summaryrefslogtreecommitdiff
path: root/sway/server.c
diff options
context:
space:
mode:
authorBrian Ashworth <[email protected]>2019-08-15 03:00:14 -0400
committerDrew DeVault <[email protected]>2019-08-20 11:34:34 +0900
commitff7d979d99ddb087a02fc457953b33e3beb4715b (patch)
tree142e0f92672c9c73b7770dea3a846fef0e8d4011 /sway/server.c
parent384afc5cb5000374414eeaec8cbb667451fcce5b (diff)
cmd_xwayland: add force for immediate launch
This just adds a force option to cmd_xwayland that allows for xwayland to be immediately launched instead of lazily launched. This is useful for slower machines so it can be part of the startup time instead of when the user is actively trying to use it
Diffstat (limited to 'sway/server.c')
-rw-r--r--sway/server.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sway/server.c b/sway/server.c
index 6fe2a919..aee2cc87 100644
--- a/sway/server.c
+++ b/sway/server.c
@@ -167,10 +167,12 @@ void server_fini(struct sway_server *server) {
bool server_start(struct sway_server *server) {
#if HAVE_XWAYLAND
- if (config->xwayland) {
- sway_log(SWAY_DEBUG, "Initializing Xwayland");
+ if (config->xwayland != XWAYLAND_MODE_DISABLED) {
+ sway_log(SWAY_DEBUG, "Initializing Xwayland (lazy=%d)",
+ config->xwayland == XWAYLAND_MODE_LAZY);
server->xwayland.wlr_xwayland =
- wlr_xwayland_create(server->wl_display, server->compositor, true);
+ wlr_xwayland_create(server->wl_display, server->compositor,
+ config->xwayland == XWAYLAND_MODE_LAZY);
wl_signal_add(&server->xwayland.wlr_xwayland->events.new_surface,
&server->xwayland_surface);
server->xwayland_surface.notify = handle_xwayland_surface;