diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-11-18 08:22:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-18 08:22:25 -0500 |
commit | b87250425fe13149e41b346f15c5cf808f376438 (patch) | |
tree | 145fcb048cc3df3d04a8b6afb90de68dd2dd80a9 /include | |
parent | Merge pull request #3142 from RyanDwyer/move-view-properties (diff) | |
parent | Use #if instead of #ifdef (diff) | |
download | sway-b87250425fe13149e41b346f15c5cf808f376438.tar.gz sway-b87250425fe13149e41b346f15c5cf808f376438.tar.zst sway-b87250425fe13149e41b346f15c5cf808f376438.zip |
Merge pull request #3147 from emersion/set10
Use #if instead of #ifdef
Diffstat (limited to 'include')
-rw-r--r-- | include/cairo.h | 12 | ||||
-rw-r--r-- | include/sway/criteria.h | 2 | ||||
-rw-r--r-- | include/sway/output.h | 2 | ||||
-rw-r--r-- | include/sway/server.h | 6 | ||||
-rw-r--r-- | include/sway/tree/root.h | 2 | ||||
-rw-r--r-- | include/sway/tree/view.h | 12 |
6 files changed, 20 insertions, 16 deletions
diff --git a/include/cairo.h b/include/cairo.h index 86530b60..f28c072f 100644 --- a/include/cairo.h +++ b/include/cairo.h | |||
@@ -1,8 +1,13 @@ | |||
1 | #ifndef _SWAY_CAIRO_H | 1 | #ifndef _SWAY_CAIRO_H |
2 | #define _SWAY_CAIRO_H | 2 | #define _SWAY_CAIRO_H |
3 | |||
4 | #include "config.h" | ||
3 | #include <stdint.h> | 5 | #include <stdint.h> |
4 | #include <cairo/cairo.h> | 6 | #include <cairo/cairo.h> |
5 | #include <wlr/types/wlr_output.h> | 7 | #include <wlr/types/wlr_output.h> |
8 | #if HAVE_GDK_PIXBUF | ||
9 | #include <gdk-pixbuf/gdk-pixbuf.h> | ||
10 | #endif | ||
6 | 11 | ||
7 | void cairo_set_source_u32(cairo_t *cairo, uint32_t color); | 12 | void cairo_set_source_u32(cairo_t *cairo, uint32_t color); |
8 | cairo_subpixel_order_t to_cairo_subpixel_order(enum wl_output_subpixel subpixel); | 13 | cairo_subpixel_order_t to_cairo_subpixel_order(enum wl_output_subpixel subpixel); |
@@ -10,12 +15,11 @@ cairo_subpixel_order_t to_cairo_subpixel_order(enum wl_output_subpixel subpixel) | |||
10 | cairo_surface_t *cairo_image_surface_scale(cairo_surface_t *image, | 15 | cairo_surface_t *cairo_image_surface_scale(cairo_surface_t *image, |
11 | int width, int height); | 16 | int width, int height); |
12 | 17 | ||
13 | #include "config.h" | 18 | #if HAVE_GDK_PIXBUF |
14 | #ifdef HAVE_GDK_PIXBUF | ||
15 | #include <gdk-pixbuf/gdk-pixbuf.h> | ||
16 | 19 | ||
17 | cairo_surface_t* gdk_cairo_image_surface_create_from_pixbuf( | 20 | cairo_surface_t* gdk_cairo_image_surface_create_from_pixbuf( |
18 | const GdkPixbuf *gdkbuf); | 21 | const GdkPixbuf *gdkbuf); |
19 | #endif //WITH_GDK_PIXBUF | 22 | |
23 | #endif // HAVE_GDK_PIXBUF | ||
20 | 24 | ||
21 | #endif | 25 | #endif |
diff --git a/include/sway/criteria.h b/include/sway/criteria.h index 323ba01d..3eb583d5 100644 --- a/include/sway/criteria.h +++ b/include/sway/criteria.h | |||
@@ -25,7 +25,7 @@ struct criteria { | |||
25 | pcre *app_id; | 25 | pcre *app_id; |
26 | pcre *con_mark; | 26 | pcre *con_mark; |
27 | uint32_t con_id; // internal ID | 27 | uint32_t con_id; // internal ID |
28 | #ifdef HAVE_XWAYLAND | 28 | #if HAVE_XWAYLAND |
29 | pcre *class; | 29 | pcre *class; |
30 | uint32_t id; // X11 window ID | 30 | uint32_t id; // X11 window ID |
31 | pcre *instance; | 31 | pcre *instance; |
diff --git a/include/sway/output.h b/include/sway/output.h index 5efe1660..43c1ab96 100644 --- a/include/sway/output.h +++ b/include/sway/output.h | |||
@@ -119,7 +119,7 @@ void output_layer_for_each_surface(struct sway_output *output, | |||
119 | struct wl_list *layer_surfaces, sway_surface_iterator_func_t iterator, | 119 | struct wl_list *layer_surfaces, sway_surface_iterator_func_t iterator, |
120 | void *user_data); | 120 | void *user_data); |
121 | 121 | ||
122 | #ifdef HAVE_XWAYLAND | 122 | #if HAVE_XWAYLAND |
123 | void output_unmanaged_for_each_surface(struct sway_output *output, | 123 | void output_unmanaged_for_each_surface(struct sway_output *output, |
124 | struct wl_list *unmanaged, sway_surface_iterator_func_t iterator, | 124 | struct wl_list *unmanaged, sway_surface_iterator_func_t iterator, |
125 | void *user_data); | 125 | void *user_data); |
diff --git a/include/sway/server.h b/include/sway/server.h index 5fced224..a3233d66 100644 --- a/include/sway/server.h +++ b/include/sway/server.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <wlr/types/wlr_xdg_shell.h> | 14 | #include <wlr/types/wlr_xdg_shell.h> |
15 | #include "config.h" | 15 | #include "config.h" |
16 | #include "list.h" | 16 | #include "list.h" |
17 | #ifdef HAVE_XWAYLAND | 17 | #if HAVE_XWAYLAND |
18 | #include "sway/xwayland.h" | 18 | #include "sway/xwayland.h" |
19 | #endif | 19 | #endif |
20 | 20 | ||
@@ -44,7 +44,7 @@ struct sway_server { | |||
44 | struct wlr_xdg_shell *xdg_shell; | 44 | struct wlr_xdg_shell *xdg_shell; |
45 | struct wl_listener xdg_shell_surface; | 45 | struct wl_listener xdg_shell_surface; |
46 | 46 | ||
47 | #ifdef HAVE_XWAYLAND | 47 | #if HAVE_XWAYLAND |
48 | struct sway_xwayland xwayland; | 48 | struct sway_xwayland xwayland; |
49 | struct wl_listener xwayland_surface; | 49 | struct wl_listener xwayland_surface; |
50 | struct wl_listener xwayland_ready; | 50 | struct wl_listener xwayland_ready; |
@@ -80,7 +80,7 @@ void handle_idle_inhibitor_v1(struct wl_listener *listener, void *data); | |||
80 | void handle_layer_shell_surface(struct wl_listener *listener, void *data); | 80 | void handle_layer_shell_surface(struct wl_listener *listener, void *data); |
81 | void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data); | 81 | void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data); |
82 | void handle_xdg_shell_surface(struct wl_listener *listener, void *data); | 82 | void handle_xdg_shell_surface(struct wl_listener *listener, void *data); |
83 | #ifdef HAVE_XWAYLAND | 83 | #if HAVE_XWAYLAND |
84 | void handle_xwayland_surface(struct wl_listener *listener, void *data); | 84 | void handle_xwayland_surface(struct wl_listener *listener, void *data); |
85 | #endif | 85 | #endif |
86 | void handle_server_decoration(struct wl_listener *listener, void *data); | 86 | void handle_server_decoration(struct wl_listener *listener, void *data); |
diff --git a/include/sway/tree/root.h b/include/sway/tree/root.h index a2d464f9..ceccc920 100644 --- a/include/sway/tree/root.h +++ b/include/sway/tree/root.h | |||
@@ -16,7 +16,7 @@ struct sway_root { | |||
16 | struct wlr_output_layout *output_layout; | 16 | struct wlr_output_layout *output_layout; |
17 | 17 | ||
18 | struct wl_listener output_layout_change; | 18 | struct wl_listener output_layout_change; |
19 | #ifdef HAVE_XWAYLAND | 19 | #if HAVE_XWAYLAND |
20 | struct wl_list xwayland_unmanaged; // sway_xwayland_unmanaged::link | 20 | struct wl_list xwayland_unmanaged; // sway_xwayland_unmanaged::link |
21 | #endif | 21 | #endif |
22 | struct wl_list drag_icons; // sway_drag_icon::link | 22 | struct wl_list drag_icons; // sway_drag_icon::link |
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index 8f045c6a..4716c688 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #include <wlr/types/wlr_surface.h> | 4 | #include <wlr/types/wlr_surface.h> |
5 | #include <wlr/types/wlr_xdg_shell_v6.h> | 5 | #include <wlr/types/wlr_xdg_shell_v6.h> |
6 | #include "config.h" | 6 | #include "config.h" |
7 | #ifdef HAVE_XWAYLAND | 7 | #if HAVE_XWAYLAND |
8 | #include <wlr/xwayland.h> | 8 | #include <wlr/xwayland.h> |
9 | #endif | 9 | #endif |
10 | #include "sway/input/input-manager.h" | 10 | #include "sway/input/input-manager.h" |
@@ -16,7 +16,7 @@ struct sway_xdg_decoration; | |||
16 | enum sway_view_type { | 16 | enum sway_view_type { |
17 | SWAY_VIEW_XDG_SHELL_V6, | 17 | SWAY_VIEW_XDG_SHELL_V6, |
18 | SWAY_VIEW_XDG_SHELL, | 18 | SWAY_VIEW_XDG_SHELL, |
19 | #ifdef HAVE_XWAYLAND | 19 | #if HAVE_XWAYLAND |
20 | SWAY_VIEW_XWAYLAND, | 20 | SWAY_VIEW_XWAYLAND, |
21 | #endif | 21 | #endif |
22 | }; | 22 | }; |
@@ -28,7 +28,7 @@ enum sway_view_prop { | |||
28 | VIEW_PROP_INSTANCE, | 28 | VIEW_PROP_INSTANCE, |
29 | VIEW_PROP_WINDOW_TYPE, | 29 | VIEW_PROP_WINDOW_TYPE, |
30 | VIEW_PROP_WINDOW_ROLE, | 30 | VIEW_PROP_WINDOW_ROLE, |
31 | #ifdef HAVE_XWAYLAND | 31 | #if HAVE_XWAYLAND |
32 | VIEW_PROP_X11_WINDOW_ID, | 32 | VIEW_PROP_X11_WINDOW_ID, |
33 | VIEW_PROP_X11_PARENT_ID, | 33 | VIEW_PROP_X11_PARENT_ID, |
34 | #endif | 34 | #endif |
@@ -100,7 +100,7 @@ struct sway_view { | |||
100 | union { | 100 | union { |
101 | struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6; | 101 | struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6; |
102 | struct wlr_xdg_surface *wlr_xdg_surface; | 102 | struct wlr_xdg_surface *wlr_xdg_surface; |
103 | #ifdef HAVE_XWAYLAND | 103 | #if HAVE_XWAYLAND |
104 | struct wlr_xwayland_surface *wlr_xwayland_surface; | 104 | struct wlr_xwayland_surface *wlr_xwayland_surface; |
105 | #endif | 105 | #endif |
106 | struct wlr_wl_shell_surface *wlr_wl_shell_surface; | 106 | struct wlr_wl_shell_surface *wlr_wl_shell_surface; |
@@ -144,7 +144,7 @@ struct sway_xdg_shell_view { | |||
144 | struct wl_listener unmap; | 144 | struct wl_listener unmap; |
145 | struct wl_listener destroy; | 145 | struct wl_listener destroy; |
146 | }; | 146 | }; |
147 | #ifdef HAVE_XWAYLAND | 147 | #if HAVE_XWAYLAND |
148 | struct sway_xwayland_view { | 148 | struct sway_xwayland_view { |
149 | struct sway_view view; | 149 | struct sway_view view; |
150 | 150 | ||
@@ -323,7 +323,7 @@ struct sway_view *view_from_wlr_xdg_surface( | |||
323 | struct wlr_xdg_surface *xdg_surface); | 323 | struct wlr_xdg_surface *xdg_surface); |
324 | struct sway_view *view_from_wlr_xdg_surface_v6( | 324 | struct sway_view *view_from_wlr_xdg_surface_v6( |
325 | struct wlr_xdg_surface_v6 *xdg_surface_v6); | 325 | struct wlr_xdg_surface_v6 *xdg_surface_v6); |
326 | #ifdef HAVE_XWAYLAND | 326 | #if HAVE_XWAYLAND |
327 | struct sway_view *view_from_wlr_xwayland_surface( | 327 | struct sway_view *view_from_wlr_xwayland_surface( |
328 | struct wlr_xwayland_surface *xsurface); | 328 | struct wlr_xwayland_surface *xsurface); |
329 | #endif | 329 | #endif |