diff options
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/output.c | 15 | ||||
-rw-r--r-- | sway/desktop/render.c | 10 | ||||
-rw-r--r-- | sway/desktop/xwayland.c | 2 |
3 files changed, 17 insertions, 10 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index a206ac6b..7cca23bd 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -128,7 +128,7 @@ void output_layer_for_each_surface(struct wl_list *layer_surfaces, user_data); } } - +#ifdef HAVE_XWAYLAND void output_unmanaged_for_each_surface(struct wl_list *unmanaged, struct sway_output *output, struct root_geometry *geo, wlr_surface_iterator_func_t iterator, void *user_data) { @@ -143,7 +143,7 @@ void output_unmanaged_for_each_surface(struct wl_list *unmanaged, iterator, user_data); } } - +#endif void output_drag_icons_for_each_surface(struct wl_list *drag_icons, struct sway_output *output, struct root_geometry *geo, wlr_surface_iterator_func_t iterator, void *user_data) { @@ -244,13 +244,13 @@ static void send_frame_done_layer(struct send_frame_done_data *data, output_layer_for_each_surface(layer_surfaces, &data->root_geo, send_frame_done_iterator, data); } - +#ifdef HAVE_XWAYLAND static void send_frame_done_unmanaged(struct send_frame_done_data *data, struct wl_list *unmanaged) { output_unmanaged_for_each_surface(unmanaged, data->output, &data->root_geo, send_frame_done_iterator, data); } - +#endif static void send_frame_done_drag_icons(struct send_frame_done_data *data, struct wl_list *drag_icons) { output_drag_icons_for_each_surface(drag_icons, data->output, &data->root_geo, @@ -291,11 +291,12 @@ static void send_frame_done(struct sway_output *output, struct timespec *when) { if (workspace->current.ws_fullscreen) { send_frame_done_container_iterator( workspace->current.ws_fullscreen->swayc, &data); - + #ifdef HAVE_XWAYLAND if (workspace->current.ws_fullscreen->type == SWAY_VIEW_XWAYLAND) { send_frame_done_unmanaged(&data, &root_container.sway_root->xwayland_unmanaged); } + #endif } else { send_frame_done_layer(&data, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND]); @@ -304,9 +305,11 @@ static void send_frame_done(struct sway_output *output, struct timespec *when) { send_frame_done_container(&data, workspace); send_frame_done_container(&data, workspace->sway_workspace->floating); - + + #ifdef HAVE_XWAYLAND send_frame_done_unmanaged(&data, &root_container.sway_root->xwayland_unmanaged); + #endif send_frame_done_layer(&data, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]); } diff --git a/sway/desktop/render.c b/sway/desktop/render.c index 7da54594..46bfec6b 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c @@ -132,7 +132,7 @@ static void render_layer(struct sway_output *output, output_layer_for_each_surface(layer_surfaces, &data.root_geo, render_surface_iterator, &data); } - +#ifdef HAVE_XWAYLAND static void render_unmanaged(struct sway_output *output, pixman_region32_t *damage, struct wl_list *unmanaged) { struct render_data data = { @@ -143,7 +143,7 @@ static void render_unmanaged(struct sway_output *output, output_unmanaged_for_each_surface(unmanaged, output, &data.root_geo, render_surface_iterator, &data); } - +#endif static void render_drag_icons(struct sway_output *output, pixman_region32_t *damage, struct wl_list *drag_icons) { struct render_data data = { @@ -866,11 +866,12 @@ void output_render(struct sway_output *output, struct timespec *when, } else { render_view_surfaces(fullscreen_view, output, damage, 1.0f); } - + #ifdef HAVE_XWAYLAND if (fullscreen_view->type == SWAY_VIEW_XWAYLAND) { render_unmanaged(output, damage, &root_container.sway_root->xwayland_unmanaged); } + #endif } else { float clear_color[] = {0.25f, 0.25f, 0.25f, 1.0f}; @@ -888,9 +889,10 @@ void output_render(struct sway_output *output, struct timespec *when, render_container(output, damage, workspace, workspace->current.focused); render_floating(output, damage); - + #ifdef HAVE_XWAYLAND render_unmanaged(output, damage, &root_container.sway_root->xwayland_unmanaged); + #endif render_layer(output, damage, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]); } diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 65d4fcd4..d940d47b 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c @@ -1,4 +1,5 @@ #define _POSIX_C_SOURCE 199309L +#ifdef HAVE_XWAYLAND #include <stdbool.h> #include <stdlib.h> #include <wayland-server.h> @@ -591,3 +592,4 @@ void handle_xwayland_ready(struct wl_listener *listener, void *data) { xcb_disconnect(xcb_conn); } +#endif |