Reset pending surface delta x and y on commit

The following sequence:
	wl_surface::attach(s, b, 1, 2)
	wl_surface::commit(s)
	wl_surface::commit(s)
would actually result in the surface getting moved by (2,4) as the
pending attach delta wasn't reset on commit, only by another attach.

This only shows up on single-buffered surfaces.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
Daniel Stone 2012-11-07 17:51:44 +11:00 committed by Kristian Høgsberg
parent d8e8271e94
commit b4f4a5980f

View File

@ -1258,6 +1258,8 @@ surface_commit(struct wl_client *client, struct wl_resource *resource)
if (surface->buffer && surface->configure)
surface->configure(surface, surface->pending.sx,
surface->pending.sy);
surface->pending.sx = 0;
surface->pending.sy = 0;
/* wl_surface.damage */
pixman_region32_init_rect(&opaque, 0, 0,