Fix unmanaged views rendering on all outputs

master
emersion 7 years ago
parent 6579717994
commit 0f7936735c
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48

@ -243,14 +243,23 @@ static void render_output(struct sway_output *output, struct timespec *when,
struct sway_view *view; struct sway_view *view;
wl_list_for_each(view, &root_container.sway_root->unmanaged_views, wl_list_for_each(view, &root_container.sway_root->unmanaged_views,
unmanaged_view_link) { unmanaged_view_link) {
if (view->type == SWAY_XWAYLAND_VIEW) { if (view->type != SWAY_XWAYLAND_VIEW) {
// the only kind of unamanged view right now is xwayland override continue;
// redirect }
int view_x = view->wlr_xwayland_surface->x;
int view_y = view->wlr_xwayland_surface->y; const struct wlr_box view_box = {
render_surface(view->surface, wlr_output, &output->last_frame, .x = view->wlr_xwayland_surface->x,
view_x, view_y, 0); .y = view->wlr_xwayland_surface->y,
.width = view->wlr_xwayland_surface->width,
.height = view->wlr_xwayland_surface->height,
};
struct wlr_box intersection;
if (!wlr_box_intersection(&view_box, output_box, &intersection)) {
continue;
} }
render_surface(view->surface, wlr_output, &output->last_frame,
view_box.x - output_box->x, view_box.y - output_box->y, 0);
} }
// TODO: Consider revising this when fullscreen windows are supported // TODO: Consider revising this when fullscreen windows are supported

Loading…
Cancel
Save