aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop')
-rw-r--r--sway/desktop/output.c15
-rw-r--r--sway/desktop/render.c10
-rw-r--r--sway/desktop/xwayland.c2
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,
128 user_data); 128 user_data);
129 } 129 }
130} 130}
131 131#ifdef HAVE_XWAYLAND
132void output_unmanaged_for_each_surface(struct wl_list *unmanaged, 132void output_unmanaged_for_each_surface(struct wl_list *unmanaged,
133 struct sway_output *output, struct root_geometry *geo, 133 struct sway_output *output, struct root_geometry *geo,
134 wlr_surface_iterator_func_t iterator, void *user_data) { 134 wlr_surface_iterator_func_t iterator, void *user_data) {
@@ -143,7 +143,7 @@ void output_unmanaged_for_each_surface(struct wl_list *unmanaged,
143 iterator, user_data); 143 iterator, user_data);
144 } 144 }
145} 145}
146 146#endif
147void output_drag_icons_for_each_surface(struct wl_list *drag_icons, 147void output_drag_icons_for_each_surface(struct wl_list *drag_icons,
148 struct sway_output *output, struct root_geometry *geo, 148 struct sway_output *output, struct root_geometry *geo,
149 wlr_surface_iterator_func_t iterator, void *user_data) { 149 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,
244 output_layer_for_each_surface(layer_surfaces, &data->root_geo, 244 output_layer_for_each_surface(layer_surfaces, &data->root_geo,
245 send_frame_done_iterator, data); 245 send_frame_done_iterator, data);
246} 246}
247 247#ifdef HAVE_XWAYLAND
248static void send_frame_done_unmanaged(struct send_frame_done_data *data, 248static void send_frame_done_unmanaged(struct send_frame_done_data *data,
249 struct wl_list *unmanaged) { 249 struct wl_list *unmanaged) {
250 output_unmanaged_for_each_surface(unmanaged, data->output, &data->root_geo, 250 output_unmanaged_for_each_surface(unmanaged, data->output, &data->root_geo,
251 send_frame_done_iterator, data); 251 send_frame_done_iterator, data);
252} 252}
253 253#endif
254static void send_frame_done_drag_icons(struct send_frame_done_data *data, 254static void send_frame_done_drag_icons(struct send_frame_done_data *data,
255 struct wl_list *drag_icons) { 255 struct wl_list *drag_icons) {
256 output_drag_icons_for_each_surface(drag_icons, data->output, &data->root_geo, 256 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) {
291 if (workspace->current.ws_fullscreen) { 291 if (workspace->current.ws_fullscreen) {
292 send_frame_done_container_iterator( 292 send_frame_done_container_iterator(
293 workspace->current.ws_fullscreen->swayc, &data); 293 workspace->current.ws_fullscreen->swayc, &data);
294 294 #ifdef HAVE_XWAYLAND
295 if (workspace->current.ws_fullscreen->type == SWAY_VIEW_XWAYLAND) { 295 if (workspace->current.ws_fullscreen->type == SWAY_VIEW_XWAYLAND) {
296 send_frame_done_unmanaged(&data, 296 send_frame_done_unmanaged(&data,
297 &root_container.sway_root->xwayland_unmanaged); 297 &root_container.sway_root->xwayland_unmanaged);
298 } 298 }
299 #endif
299 } else { 300 } else {
300 send_frame_done_layer(&data, 301 send_frame_done_layer(&data,
301 &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND]); 302 &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND]);
@@ -304,9 +305,11 @@ static void send_frame_done(struct sway_output *output, struct timespec *when) {
304 305
305 send_frame_done_container(&data, workspace); 306 send_frame_done_container(&data, workspace);
306 send_frame_done_container(&data, workspace->sway_workspace->floating); 307 send_frame_done_container(&data, workspace->sway_workspace->floating);
307 308
309 #ifdef HAVE_XWAYLAND
308 send_frame_done_unmanaged(&data, 310 send_frame_done_unmanaged(&data,
309 &root_container.sway_root->xwayland_unmanaged); 311 &root_container.sway_root->xwayland_unmanaged);
312 #endif
310 send_frame_done_layer(&data, 313 send_frame_done_layer(&data,
311 &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]); 314 &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]);
312 } 315 }
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,
132 output_layer_for_each_surface(layer_surfaces, &data.root_geo, 132 output_layer_for_each_surface(layer_surfaces, &data.root_geo,
133 render_surface_iterator, &data); 133 render_surface_iterator, &data);
134} 134}
135 135#ifdef HAVE_XWAYLAND
136static void render_unmanaged(struct sway_output *output, 136static void render_unmanaged(struct sway_output *output,
137 pixman_region32_t *damage, struct wl_list *unmanaged) { 137 pixman_region32_t *damage, struct wl_list *unmanaged) {
138 struct render_data data = { 138 struct render_data data = {
@@ -143,7 +143,7 @@ static void render_unmanaged(struct sway_output *output,
143 output_unmanaged_for_each_surface(unmanaged, output, &data.root_geo, 143 output_unmanaged_for_each_surface(unmanaged, output, &data.root_geo,
144 render_surface_iterator, &data); 144 render_surface_iterator, &data);
145} 145}
146 146#endif
147static void render_drag_icons(struct sway_output *output, 147static void render_drag_icons(struct sway_output *output,
148 pixman_region32_t *damage, struct wl_list *drag_icons) { 148 pixman_region32_t *damage, struct wl_list *drag_icons) {
149 struct render_data data = { 149 struct render_data data = {
@@ -866,11 +866,12 @@ void output_render(struct sway_output *output, struct timespec *when,
866 } else { 866 } else {
867 render_view_surfaces(fullscreen_view, output, damage, 1.0f); 867 render_view_surfaces(fullscreen_view, output, damage, 1.0f);
868 } 868 }
869 869 #ifdef HAVE_XWAYLAND
870 if (fullscreen_view->type == SWAY_VIEW_XWAYLAND) { 870 if (fullscreen_view->type == SWAY_VIEW_XWAYLAND) {
871 render_unmanaged(output, damage, 871 render_unmanaged(output, damage,
872 &root_container.sway_root->xwayland_unmanaged); 872 &root_container.sway_root->xwayland_unmanaged);
873 } 873 }
874 #endif
874 } else { 875 } else {
875 float clear_color[] = {0.25f, 0.25f, 0.25f, 1.0f}; 876 float clear_color[] = {0.25f, 0.25f, 0.25f, 1.0f};
876 877
@@ -888,9 +889,10 @@ void output_render(struct sway_output *output, struct timespec *when,
888 889
889 render_container(output, damage, workspace, workspace->current.focused); 890 render_container(output, damage, workspace, workspace->current.focused);
890 render_floating(output, damage); 891 render_floating(output, damage);
891 892 #ifdef HAVE_XWAYLAND
892 render_unmanaged(output, damage, 893 render_unmanaged(output, damage,
893 &root_container.sway_root->xwayland_unmanaged); 894 &root_container.sway_root->xwayland_unmanaged);
895 #endif
894 render_layer(output, damage, 896 render_layer(output, damage,
895 &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]); 897 &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]);
896 } 898 }
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 @@
1#define _POSIX_C_SOURCE 199309L 1#define _POSIX_C_SOURCE 199309L
2#ifdef HAVE_XWAYLAND
2#include <stdbool.h> 3#include <stdbool.h>
3#include <stdlib.h> 4#include <stdlib.h>
4#include <wayland-server.h> 5#include <wayland-server.h>
@@ -591,3 +592,4 @@ void handle_xwayland_ready(struct wl_listener *listener, void *data) {
591 592
592 xcb_disconnect(xcb_conn); 593 xcb_disconnect(xcb_conn);
593} 594}
595#endif