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.
diff --git a/compositor/compositor-wayland.c b/compositor/compositor-wayland.c
index 40dee58..b216ebd 100644
--- a/compositor/compositor-wayland.c
+++ b/compositor/compositor-wayland.c
@@ -193,7 +193,8 @@
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 @@
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);