aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-03-31 10:56:49 -0400
committerLibravatar emersion <contact@emersion.fr>2018-03-31 10:56:49 -0400
commit0f7936735cfc8224f9926199b7e807e95d86d900 (patch)
tree6c82701983f726d37ea14ed77bf20dabe03a4f04 /sway/desktop
parentFix xwayland configure position (diff)
downloadsway-0f7936735cfc8224f9926199b7e807e95d86d900.tar.gz
sway-0f7936735cfc8224f9926199b7e807e95d86d900.tar.zst
sway-0f7936735cfc8224f9926199b7e807e95d86d900.zip
Fix unmanaged views rendering on all outputs
Diffstat (limited to 'sway/desktop')
-rw-r--r--sway/desktop/output.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index c248b29e..24c0bf40 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -243,14 +243,23 @@ 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 248 }
249 int view_x = view->wlr_xwayland_surface->x; 249
250 int view_y = view->wlr_xwayland_surface->y; 250 const struct wlr_box view_box = {
251 render_surface(view->surface, wlr_output, &output->last_frame, 251 .x = view->wlr_xwayland_surface->x,
252 view_x, view_y, 0); 252 .y = view->wlr_xwayland_surface->y,
253 .width = view->wlr_xwayland_surface->width,
254 .height = view->wlr_xwayland_surface->height,
255 };
256 struct wlr_box intersection;
257 if (!wlr_box_intersection(&view_box, output_box, &intersection)) {
258 continue;
253 } 259 }
260
261 render_surface(view->surface, wlr_output, &output->last_frame,
262 view_box.x - output_box->x, view_box.y - output_box->y, 0);
254 } 263 }
255 264
256 // TODO: Consider revising this when fullscreen windows are supported 265 // TODO: Consider revising this when fullscreen windows are supported