aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/xwayland.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-08-15 03:00:14 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-08-20 11:34:34 +0900
commitff7d979d99ddb087a02fc457953b33e3beb4715b (patch)
tree142e0f92672c9c73b7770dea3a846fef0e8d4011 /sway/commands/xwayland.c
parentinput/keyboard: send released only if pressed sent (diff)
downloadsway-ff7d979d99ddb087a02fc457953b33e3beb4715b.tar.gz
sway-ff7d979d99ddb087a02fc457953b33e3beb4715b.tar.zst
sway-ff7d979d99ddb087a02fc457953b33e3beb4715b.zip
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/commands/xwayland.c')
-rw-r--r--sway/commands/xwayland.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sway/commands/xwayland.c b/sway/commands/xwayland.c
index 62293276..38559f55 100644
--- a/sway/commands/xwayland.c
+++ b/sway/commands/xwayland.c
@@ -11,7 +11,15 @@ struct cmd_results *cmd_xwayland(int argc, char **argv) {
11 } 11 }
12 12
13#ifdef HAVE_XWAYLAND 13#ifdef HAVE_XWAYLAND
14 bool xwayland = parse_boolean(argv[0], true); 14 enum xwayland_mode xwayland;
15 if (strcmp(argv[0], "force") == 0) {
16 xwayland = XWAYLAND_MODE_IMMEADIATE;
17 } else if (parse_boolean(argv[0], true)) {
18 xwayland = XWAYLAND_MODE_LAZY;
19 } else {
20 xwayland = XWAYLAND_MODE_DISABLED;
21 }
22
15 if (config->reloading && config->xwayland != xwayland) { 23 if (config->reloading && config->xwayland != xwayland) {
16 return cmd_results_new(CMD_FAILURE, 24 return cmd_results_new(CMD_FAILURE,
17 "xwayland can only be enabled/disabled at launch"); 25 "xwayland can only be enabled/disabled at launch");