aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/swap.c
diff options
context:
space:
mode:
authorLibravatar Pascal Pascher <aur@clouddrop.de>2018-07-24 23:37:41 +0200
committerLibravatar Pascal Pascher <aur@clouddrop.de>2018-07-24 23:37:41 +0200
commit2bf893248a94c7f70a9557aad4a8228731041eeb (patch)
treeec86137e1b5881151b20917f311ecce3d24fba8f /sway/commands/swap.c
parentAdded meson option "enable_xwayland" (default: true) to enable/disable xwayla... (diff)
downloadsway-2bf893248a94c7f70a9557aad4a8228731041eeb.tar.gz
sway-2bf893248a94c7f70a9557aad4a8228731041eeb.tar.zst
sway-2bf893248a94c7f70a9557aad4a8228731041eeb.zip
style fixes, exclude sway/desctop/xwayland.c when enable_xwayland: false
Diffstat (limited to 'sway/commands/swap.c')
-rw-r--r--sway/commands/swap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sway/commands/swap.c b/sway/commands/swap.c
index 3563cdd9..325adc38 100644
--- a/sway/commands/swap.c
+++ b/sway/commands/swap.c
@@ -14,14 +14,14 @@ static bool test_con_id(struct sway_container *container, void *con_id) {
14} 14}
15 15
16static bool test_id(struct sway_container *container, void *id) { 16static bool test_id(struct sway_container *container, void *id) {
17 #ifdef HAVE_XWAYLAND 17#ifdef HAVE_XWAYLAND
18 xcb_window_t *wid = id; 18 xcb_window_t *wid = id;
19 return (container->type == C_VIEW 19 return (container->type == C_VIEW
20 && container->sway_view->type == SWAY_VIEW_XWAYLAND 20 && container->sway_view->type == SWAY_VIEW_XWAYLAND
21 && container->sway_view->wlr_xwayland_surface->window_id == *wid); 21 && container->sway_view->wlr_xwayland_surface->window_id == *wid);
22 #else 22#else
23 return false; 23 return false;
24 #endif 24#endif
25} 25}
26 26
27static bool test_mark(struct sway_container *container, void *mark) { 27static bool test_mark(struct sway_container *container, void *mark) {
@@ -47,10 +47,10 @@ struct cmd_results *cmd_swap(int argc, char **argv) {
47 47
48 char *value = join_args(argv + 3, argc - 3); 48 char *value = join_args(argv + 3, argc - 3);
49 if (strcasecmp(argv[2], "id") == 0) { 49 if (strcasecmp(argv[2], "id") == 0) {
50 #ifdef HAVE_XWAYLAND 50#ifdef HAVE_XWAYLAND
51 xcb_window_t id = strtol(value, NULL, 0); 51 xcb_window_t id = strtol(value, NULL, 0);
52 other = container_find(&root_container, test_id, (void *)&id); 52 other = container_find(&root_container, test_id, (void *)&id);
53 #endif 53#endif
54 } else if (strcasecmp(argv[2], "con_id") == 0) { 54 } else if (strcasecmp(argv[2], "con_id") == 0) {
55 size_t con_id = atoi(value); 55 size_t con_id = atoi(value);
56 other = container_find(&root_container, test_con_id, (void *)con_id); 56 other = container_find(&root_container, test_con_id, (void *)con_id);