From ec4d342aa9b536c71bcf0d75249549860941793b Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Mon, 14 Mar 2011 12:07:26 +0100 Subject: Support per surface frame events This fixes tearing with multi head. --- clients/smoke.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'clients/smoke.c') 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); -- cgit v1.2.3