diff options
author | Pascal Pascher <aur@clouddrop.de> | 2018-07-24 22:16:06 +0200 |
---|---|---|
committer | Pascal Pascher <aur@clouddrop.de> | 2018-07-24 22:16:06 +0200 |
commit | 24ad1c3983192b47345566fd876e26b45160d68e (patch) | |
tree | b617f8d15cb20897b1c016fb67fab80d7245c66a /sway/commands | |
parent | 817d37c95032946a2e508fcc33cfa5c7ed65cc0d (diff) |
Added meson option "enable_xwayland" (default: true) to enable/disable xwayland support
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/swap.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sway/commands/swap.c b/sway/commands/swap.c index 2fc88308..3563cdd9 100644 --- a/sway/commands/swap.c +++ b/sway/commands/swap.c @@ -14,10 +14,14 @@ static bool test_con_id(struct sway_container *container, void *con_id) { } static bool test_id(struct sway_container *container, void *id) { + #ifdef HAVE_XWAYLAND xcb_window_t *wid = id; return (container->type == C_VIEW && container->sway_view->type == SWAY_VIEW_XWAYLAND && container->sway_view->wlr_xwayland_surface->window_id == *wid); + #else + return false; + #endif } static bool test_mark(struct sway_container *container, void *mark) { @@ -43,8 +47,10 @@ struct cmd_results *cmd_swap(int argc, char **argv) { char *value = join_args(argv + 3, argc - 3); if (strcasecmp(argv[2], "id") == 0) { + #ifdef HAVE_XWAYLAND xcb_window_t id = strtol(value, NULL, 0); other = container_find(&root_container, test_id, (void *)&id); + #endif } else if (strcasecmp(argv[2], "con_id") == 0) { size_t con_id = atoi(value); other = container_find(&root_container, test_con_id, (void *)con_id); |