aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/output.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r--sway/desktop/output.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index c248b29e..0d706c52 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -243,14 +243,25 @@ static void render_output(struct sway_output *output, struct timespec *when,
243 struct sway_view *view; 243 struct sway_view *view;
244 wl_list_for_each(view, &root_container.sway_root->unmanaged_views, 244 wl_list_for_each(view, &root_container.sway_root->unmanaged_views,
245 unmanaged_view_link) { 245 unmanaged_view_link) {
246 if (view->type == SWAY_XWAYLAND_VIEW) { 246 if (view->type != SWAY_XWAYLAND_VIEW) {
247 // the only kind of unamanged view right now is xwayland override 247 continue;
248 // redirect
249 int view_x = view->wlr_xwayland_surface->x;
250 int view_y = view->wlr_xwayland_surface->y;
251 render_surface(view->surface, wlr_output, &output->last_frame,
252 view_x, view_y, 0);
253 } 248 }
249
250 struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface;
251
252 const struct wlr_box view_box = {
253 .x = xsurface->x,
254 .y = xsurface->y,
255 .width = xsurface->width,
256 .height = xsurface->height,
257 };
258 struct wlr_box intersection;
259 if (!wlr_box_intersection(&view_box, output_box, &intersection)) {
260 continue;
261 }
262
263 render_surface(view->surface, wlr_output, &output->last_frame,
264 view_box.x - output_box->x, view_box.y - output_box->y, 0);
254 } 265 }
255 266
256 // TODO: Consider revising this when fullscreen windows are supported 267 // TODO: Consider revising this when fullscreen windows are supported