summaryrefslogtreecommitdiff
path: root/clients/smoke.c
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-03-14 12:07:26 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-03-17 11:54:35 +0100
commitec4d342aa9b536c71bcf0d75249549860941793b (patch)
tree8652a1301f50a3db74f951a1d15dd84ded1cd40a /clients/smoke.c
parent9c26ff3507da9708f5028b37ee9a23df43be0246 (diff)
downloadweston-ec4d342aa9b536c71bcf0d75249549860941793b.tar.gz
weston-ec4d342aa9b536c71bcf0d75249549860941793b.tar.bz2
weston-ec4d342aa9b536c71bcf0d75249549860941793b.zip
Support per surface frame events
This fixes tearing with multi head.
Diffstat (limited to 'clients/smoke.c')
-rw-r--r--clients/smoke.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/clients/smoke.c b/clients/smoke.c
index 0710b3a1..32ca0c08 100644
--- a/clients/smoke.c
+++ b/clients/smoke.c
@@ -173,7 +173,7 @@ static void render(struct smoke *smoke)
}
static void
-frame_callback(void *data, uint32_t time)
+frame_callback(struct wl_surface *surface, void *data, uint32_t time)
{
struct smoke *smoke = data;
@@ -201,6 +201,7 @@ frame_callback(void *data, uint32_t time)
window_damage(smoke->window, 0, 0, smoke->width, smoke->height);
wl_display_frame_callback(display_get_display(smoke->display),
+ window_get_wl_surface(smoke->window),
frame_callback, smoke);
}
@@ -288,6 +289,7 @@ int main(int argc, char *argv[])
window_set_user_data(smoke.window, &smoke);
wl_display_frame_callback(display_get_display(d),
+ window_get_wl_surface(smoke.window),
frame_callback, &smoke);
display_run(d);