diff options
author | emersion <contact@emersion.fr> | 2018-11-18 00:33:06 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-11-18 00:33:06 +0100 |
commit | cad851805bea6b4777685df1c6adf8cb9fa71835 (patch) | |
tree | 145fcb048cc3df3d04a8b6afb90de68dd2dd80a9 /sway/tree | |
parent | Merge pull request #3142 from RyanDwyer/move-view-properties (diff) | |
download | sway-cad851805bea6b4777685df1c6adf8cb9fa71835.tar.gz sway-cad851805bea6b4777685df1c6adf8cb9fa71835.tar.zst sway-cad851805bea6b4777685df1c6adf8cb9fa71835.zip |
Use #if instead of #ifdef
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/container.c | 2 | ||||
-rw-r--r-- | sway/tree/root.c | 2 | ||||
-rw-r--r-- | sway/tree/view.c | 10 |
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 | |||
171 | double _sx, _sy; | 171 | double _sx, _sy; |
172 | struct wlr_surface *_surface = NULL; | 172 | struct wlr_surface *_surface = NULL; |
173 | switch (view->type) { | 173 | switch (view->type) { |
174 | #ifdef HAVE_XWAYLAND | 174 | #if HAVE_XWAYLAND |
175 | case SWAY_VIEW_XWAYLAND: | 175 | case SWAY_VIEW_XWAYLAND: |
176 | _surface = wlr_surface_surface_at(view->surface, | 176 | _surface = wlr_surface_surface_at(view->surface, |
177 | view_sx, view_sy, &_sx, &_sy); | 177 | 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) { | |||
31 | node_init(&root->node, N_ROOT, root); | 31 | node_init(&root->node, N_ROOT, root); |
32 | root->output_layout = wlr_output_layout_create(); | 32 | root->output_layout = wlr_output_layout_create(); |
33 | wl_list_init(&root->all_outputs); | 33 | wl_list_init(&root->all_outputs); |
34 | #ifdef HAVE_XWAYLAND | 34 | #if HAVE_XWAYLAND |
35 | wl_list_init(&root->xwayland_unmanaged); | 35 | wl_list_init(&root->xwayland_unmanaged); |
36 | #endif | 36 | #endif |
37 | wl_list_init(&root->drag_icons); | 37 | 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 @@ | |||
8 | #include <wlr/types/wlr_server_decoration.h> | 8 | #include <wlr/types/wlr_server_decoration.h> |
9 | #include <wlr/types/wlr_xdg_decoration_v1.h> | 9 | #include <wlr/types/wlr_xdg_decoration_v1.h> |
10 | #include "config.h" | 10 | #include "config.h" |
11 | #ifdef HAVE_XWAYLAND | 11 | #if HAVE_XWAYLAND |
12 | #include <wlr/xwayland.h> | 12 | #include <wlr/xwayland.h> |
13 | #endif | 13 | #endif |
14 | #include "list.h" | 14 | #include "list.h" |
@@ -101,7 +101,7 @@ const char *view_get_instance(struct sway_view *view) { | |||
101 | } | 101 | } |
102 | return NULL; | 102 | return NULL; |
103 | } | 103 | } |
104 | #ifdef HAVE_XWAYLAND | 104 | #if HAVE_XWAYLAND |
105 | uint32_t view_get_x11_window_id(struct sway_view *view) { | 105 | uint32_t view_get_x11_window_id(struct sway_view *view) { |
106 | if (view->impl->get_int_prop) { | 106 | if (view->impl->get_int_prop) { |
107 | return view->impl->get_int_prop(view, VIEW_PROP_X11_WINDOW_ID); | 107 | 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) { | |||
136 | return "xdg_shell_v6"; | 136 | return "xdg_shell_v6"; |
137 | case SWAY_VIEW_XDG_SHELL: | 137 | case SWAY_VIEW_XDG_SHELL: |
138 | return "xdg_shell"; | 138 | return "xdg_shell"; |
139 | #ifdef HAVE_XWAYLAND | 139 | #if HAVE_XWAYLAND |
140 | case SWAY_VIEW_XWAYLAND: | 140 | case SWAY_VIEW_XWAYLAND: |
141 | return "xwayland"; | 141 | return "xwayland"; |
142 | #endif | 142 | #endif |
@@ -484,7 +484,7 @@ static struct sway_workspace *select_workspace(struct sway_view *view) { | |||
484 | 484 | ||
485 | // Check if there's a PID mapping | 485 | // Check if there's a PID mapping |
486 | pid_t pid; | 486 | pid_t pid; |
487 | #ifdef HAVE_XWAYLAND | 487 | #if HAVE_XWAYLAND |
488 | if (view->type == SWAY_VIEW_XWAYLAND) { | 488 | if (view->type == SWAY_VIEW_XWAYLAND) { |
489 | struct wlr_xwayland_surface *surf = | 489 | struct wlr_xwayland_surface *surf = |
490 | wlr_xwayland_surface_from_wlr_surface(view->surface); | 490 | wlr_xwayland_surface_from_wlr_surface(view->surface); |
@@ -802,7 +802,7 @@ struct sway_view *view_from_wlr_surface(struct wlr_surface *wlr_surface) { | |||
802 | wlr_xdg_surface_v6_from_wlr_surface(wlr_surface); | 802 | wlr_xdg_surface_v6_from_wlr_surface(wlr_surface); |
803 | return view_from_wlr_xdg_surface_v6(xdg_surface_v6); | 803 | return view_from_wlr_xdg_surface_v6(xdg_surface_v6); |
804 | } | 804 | } |
805 | #ifdef HAVE_XWAYLAND | 805 | #if HAVE_XWAYLAND |
806 | if (wlr_surface_is_xwayland_surface(wlr_surface)) { | 806 | if (wlr_surface_is_xwayland_surface(wlr_surface)) { |
807 | struct wlr_xwayland_surface *xsurface = | 807 | struct wlr_xwayland_surface *xsurface = |
808 | wlr_xwayland_surface_from_wlr_surface(wlr_surface); | 808 | wlr_xwayland_surface_from_wlr_surface(wlr_surface); |