From: Armin Krezović <[email protected]> Damage coordinates are in global coordinate space, and they need to be translated to local coordinate space so multiple outputs can work.
This path now matches the similar path in the X11 backend. This patch fixes the appearance of multiple windows in the parent compositor. Previously, all windows except the one with nested output position 0,0 would have their damage for the parent wl_surface always fall outside of the wl_surface, save the decorations which were handled separately. If the parent compositor was Weston/GL, this would lead to the output area remaining black as partial GL texture uploads would practically never update the texture. If the parent compositor was Weston/pixman, the parent windows would not update on screen unless something else caused the area to be repainted. [Pekka: adjusted commit message] Signed-off-by: Pekka Paalanen <[email protected]> --- libweston/compositor-wayland.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libweston/compositor-wayland.c b/libweston/compositor-wayland.c index bc78cbdb..eacf385d 100644 --- a/libweston/compositor-wayland.c +++ b/libweston/compositor-wayland.c @@ -558,11 +558,15 @@ wayland_shm_buffer_attach(struct wayland_shm_buffer *sb) int i, n; pixman_region32_init(&damage); + pixman_region32_copy(&damage, &sb->damage); + pixman_region32_translate(&damage, -sb->output->base.x, + -sb->output->base.y); + weston_transformed_region(sb->output->base.width, sb->output->base.height, sb->output->base.transform, sb->output->base.current_scale, - &sb->damage, &damage); + &damage, &damage); if (sb->output->frame) { frame_interior(sb->output->frame, &ix, &iy, &iwidth, &iheight); -- 2.13.6 _______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
