aboutsummaryrefslogtreecommitdiff
path: root/sway/tree
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-11-18 00:33:06 +0100
committeremersion <contact@emersion.fr>2018-11-18 00:33:06 +0100
commitcad851805bea6b4777685df1c6adf8cb9fa71835 (patch)
tree145fcb048cc3df3d04a8b6afb90de68dd2dd80a9 /sway/tree
parenteda3bfeed5097c71634332bfe998188b028abf02 (diff)
Use #if instead of #ifdef
Diffstat (limited to 'sway/tree')
-rw-r--r--sway/tree/container.c2
-rw-r--r--sway/tree/root.c2
-rw-r--r--sway/tree/view.c10
3 files changed, 7 insertions, 7 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 89d80e51..cf6f5b54 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -171,7 +171,7 @@ static struct sway_container *surface_at_view(struct sway_container *con, double
double _sx, _sy;
struct wlr_surface *_surface = NULL;
switch (view->type) {
-#ifdef HAVE_XWAYLAND
+#if HAVE_XWAYLAND
case SWAY_VIEW_XWAYLAND:
_surface = wlr_surface_surface_at(view->surface,
view_sx, view_sy, &_sx, &_sy);
diff --git a/sway/tree/root.c b/sway/tree/root.c
index 9bda7c28..544d666a 100644
--- a/sway/tree/root.c
+++ b/sway/tree/root.c
@@ -31,7 +31,7 @@ struct sway_root *root_create(void) {
node_init(&root->node, N_ROOT, root);
root->output_layout = wlr_output_layout_create();
wl_list_init(&root->all_outputs);
-#ifdef HAVE_XWAYLAND
+#if HAVE_XWAYLAND
wl_list_init(&root->xwayland_unmanaged);
#endif
wl_list_init(&root->drag_icons);
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 18195467..d7110619 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -8,7 +8,7 @@
#include <wlr/types/wlr_server_decoration.h>
#include <wlr/types/wlr_xdg_decoration_v1.h>
#include "config.h"
-#ifdef HAVE_XWAYLAND
+#if HAVE_XWAYLAND
#include <wlr/xwayland.h>
#endif
#include "list.h"
@@ -101,7 +101,7 @@ const char *view_get_instance(struct sway_view *view) {
}
return NULL;
}
-#ifdef HAVE_XWAYLAND
+#if HAVE_XWAYLAND
uint32_t view_get_x11_window_id(struct sway_view *view) {
if (view->impl->get_int_prop) {
return view->impl->get_int_prop(view, VIEW_PROP_X11_WINDOW_ID);
@@ -136,7 +136,7 @@ const char *view_get_shell(struct sway_view *view) {
return "xdg_shell_v6";
case SWAY_VIEW_XDG_SHELL:
return "xdg_shell";
-#ifdef HAVE_XWAYLAND
+#if HAVE_XWAYLAND
case SWAY_VIEW_XWAYLAND:
return "xwayland";
#endif
@@ -484,7 +484,7 @@ static struct sway_workspace *select_workspace(struct sway_view *view) {
// Check if there's a PID mapping
pid_t pid;
-#ifdef HAVE_XWAYLAND
+#if HAVE_XWAYLAND
if (view->type == SWAY_VIEW_XWAYLAND) {
struct wlr_xwayland_surface *surf =
wlr_xwayland_surface_from_wlr_surface(view->surface);
@@ -802,7 +802,7 @@ struct sway_view *view_from_wlr_surface(struct wlr_surface *wlr_surface) {
wlr_xdg_surface_v6_from_wlr_surface(wlr_surface);
return view_from_wlr_xdg_surface_v6(xdg_surface_v6);
}
-#ifdef HAVE_XWAYLAND
+#if HAVE_XWAYLAND
if (wlr_surface_is_xwayland_surface(wlr_surface)) {
struct wlr_xwayland_surface *xsurface =
wlr_xwayland_surface_from_wlr_surface(wlr_surface);