summaryrefslogtreecommitdiffstats
path: root/gears.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2008-12-15 20:35:24 -0500
committerKristian Høgsberg <krh@redhat.com>2008-12-15 20:35:24 -0500
commitd2412e2c2ea463189550d5f7a5d95a7aab13a502 (patch)
tree52663e9e69620646fc8e2cbff63948567b648b88 /gears.c
parent0ea4710b3dcf1fcfd596a1d68e0ab38e3657bc5f (diff)
downloadwayland-d2412e2c2ea463189550d5f7a5d95a7aab13a502.tar.gz
wayland-d2412e2c2ea463189550d5f7a5d95a7aab13a502.tar.xz
wayland-d2412e2c2ea463189550d5f7a5d95a7aab13a502.zip
Redesign the compositor / server interface.
This lets the compositor directly provide the implementation of the RMI objects for the surface object and a new compositor object. We avoid the manual forwarding of requests into the compositor and the clumsy compositor interface struct.
Diffstat (limited to 'gears.c')
-rw-r--r--gears.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gears.c b/gears.c
index 6149e12..4bf5475 100644
--- a/gears.c
+++ b/gears.c
@@ -47,6 +47,7 @@ struct gears {
struct window *window;
struct wl_display *wl_display;
+ struct wl_compositor *compositor;
struct rectangle rectangle;
EGLDisplay display;
@@ -320,7 +321,7 @@ frame_handler(struct window *window, uint32_t frame, uint32_t timestamp, void *d
&gears->rectangle,
gears->buffer->name, gears->buffer->stride);
- wl_display_commit(gears->wl_display, 0);
+ wl_compositor_commit(gears->compositor, 0);
gears->angle += 1;
}
@@ -379,6 +380,8 @@ gears_create(struct wl_display *display, int fd)
glEnable(GL_DEPTH_TEST);
glClearColor(0, 0, 0, 0.92);
+ gears->compositor = wl_display_get_compositor(display);
+
draw_gears(gears);
frame_handler(gears->window, 0, 0, gears);