From f98ca3ab7ca14f6578b1478de96ff50c96853486 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Sat, 16 May 2020 23:03:25 +0000 Subject: [PATCH] build: unbreak -Dxwayland=false after cd9d1038a822 ../sway/commands/xwayland/scale.c:23:12: error: no member named 'xwayland' in 'struct sway_server' if(server.xwayland.wlr_xwayland != NULL) { ~~~~~~ ^ ../sway/commands/xwayland/scale.c:24:3: error: implicit declaration of function 'wlr_xwayland_set_scale' is invalid in C99 [-Werror,-Wimplicit-function-declaration] wlr_xwayland_set_scale(server.xwayland.wlr_xwayland, scale); ^ ../sway/commands/xwayland/scale.c:24:3: note: did you mean 'xwayland_cmd_scale'? ../sway/commands/xwayland/scale.c:7:21: note: 'xwayland_cmd_scale' declared here struct cmd_results *xwayland_cmd_scale(int argc, char **argv) { ^ ../sway/commands/xwayland/scale.c:24:33: error: no member named 'xwayland' in 'struct sway_server' wlr_xwayland_set_scale(server.xwayland.wlr_xwayland, scale); ~~~~~~ ^ --- sway/commands.c | 2 ++ sway/meson.build | 15 ++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/sway/commands.c b/sway/commands.c index 5248670db9..0c580be5e7 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -97,7 +97,9 @@ static struct cmd_handler handlers[] = { { "unbindsym", cmd_unbindsym }, { "workspace", cmd_workspace }, { "workspace_auto_back_and_forth", cmd_ws_auto_back_and_forth }, +#if HAVE_XWAYLAND { "xwayland", cmd_xwayland }, +#endif }; /* Config-time only commands. Keep alphabetized */ diff --git a/sway/meson.build b/sway/meson.build index 774cfc75f4..acc8d1ac95 100644 --- a/sway/meson.build +++ b/sway/meson.build @@ -118,7 +118,6 @@ sway_sources = files( 'commands/workspace.c', 'commands/workspace_layout.c', 'commands/ws_auto_back_and_forth.c', - 'commands/xwayland.c', 'commands/bar/bind.c', 'commands/bar/binding_mode_indicator.c', @@ -192,11 +191,6 @@ sway_sources = files( 'commands/output/toggle.c', 'commands/output/transform.c', - 'commands/xwayland/enable.c', - 'commands/xwayland/disable.c', - 'commands/xwayland/force.c', - 'commands/xwayland/scale.c', - 'tree/arrange.c', 'tree/container.c', 'tree/node.c', @@ -223,7 +217,14 @@ sway_deps = [ ] if have_xwayland - sway_sources += 'desktop/xwayland.c' + sway_sources += files( + 'commands/xwayland.c', + 'commands/xwayland/enable.c', + 'commands/xwayland/disable.c', + 'commands/xwayland/force.c', + 'commands/xwayland/scale.c', + 'desktop/xwayland.c' + ) sway_deps += xcb endif