Update surface.attach and change surface.map to surface.map_toplevel

The new map_toplevel() request no longer specifies a position and takes
the size from the attached buffer.  The attach request now takes a
position relative to the top-left corner of the old buffer to let
clients specify the relative position of the new buffer.
This commit is contained in:
Kristian Høgsberg 2010-12-17 09:53:12 -05:00
parent 53a7f2137b
commit 82da52b15b
13 changed files with 130 additions and 157 deletions

View file

@ -193,7 +193,8 @@ wayland_compositor_present(struct wlsc_compositor *base)
output->rbo[output->current]);
wl_surface_attach(output->parent.surface,
output->parent.buffer[output->current ^ 1]);
output->parent.buffer[output->current ^ 1],
0, 0);
wl_surface_damage(output->parent.surface, 0, 0,
output->base.width, output->base.height);
}
@ -264,10 +265,8 @@ wayland_compositor_create_output(struct wayland_compositor *c,
output->rbo[output->current]);
wl_surface_attach(output->parent.surface,
output->parent.buffer[output->current]);
wl_surface_map(output->parent.surface,
output->base.x, output->base.y,
output->base.width, output->base.height);
output->parent.buffer[output->current], 0, 0);
wl_surface_map_toplevel(output->parent.surface);
glClearColor(0, 0, 0, 0.5);