[PATCH xserver] xwayland: Attach buffer before committing

Kristian Høgsberg hoegsberg at gmail.com
Mon Mar 18 19:50:15 PDT 2013


On Sat, Mar 09, 2013 at 08:24:10AM -0700, Scott Moreau wrote:
> This fixes the wlshm path which was not updating the buffer correctly.

Yes, thanks.  It's a little odd, to see the attach after the damage
posting - conceptually you attach a buffer and then mark the damaged
regions in that buffer.  But since it's all batched and handled at
commit time in the right order, it works.

>  hw/xfree86/xwayland/xwayland.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/hw/xfree86/xwayland/xwayland.c b/hw/xfree86/xwayland/xwayland.c
> index d97f4ee..f59bfe4 100644
> --- a/hw/xfree86/xwayland/xwayland.c
> +++ b/hw/xfree86/xwayland/xwayland.c
> @@ -344,6 +344,9 @@ void xwl_screen_post_damage(struct xwl_screen *xwl_screen)
>  			      box->x2 - box->x1 + 1,
>  			      box->y2 - box->y1 + 1);
>  	}
> +	wl_surface_attach(xwl_window->surface,
> +			  xwl_window->buffer,
> +			  0, 0);
>  	wl_surface_commit(xwl_window->surface);
>  	DamageEmpty(xwl_window->damage);
>      }
> -- 
> 1.7.10.4
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list