summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2013-04-04 20:25:42 +0100
committerRobert Bragg <robert@linux.intel.com>2013-04-30 16:39:31 +0100
commit816a5bc43764a3cbb6eda3a608ba71d528d66eb7 (patch)
tree0a94b68c4bcce232c2e7cf7702d12472cc411004 /examples
parentb01e0e6a487f6bb57265f2815d05d1596b3edbe1 (diff)
downloadcogl-816a5bc43764a3cbb6eda3a608ba71d528d66eb7.tar.gz
onscreen: Make the resize callback work the same as the frame callback
When adding the frame callback API in 70040166 we decided on a common idiom for adding callbacks which would return an opaque pointer representing the closure for the callback. This pointer can then be used to later remove the callback. The closure can also contain an optional callback to invoke when the user data parameter is destroyed. The resize callback didn't work this way and instead had an integer handle to identify the closure. This patch changes it to work the same way as the frame callback. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 33164c4b04d253ebe0ff41b12c1e90232c519274)
Diffstat (limited to 'examples')
-rw-r--r--examples/cogl-x11-foreign.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/cogl-x11-foreign.c b/examples/cogl-x11-foreign.c
index a60397cd..e9ac93d9 100644
--- a/examples/cogl-x11-foreign.c
+++ b/examples/cogl-x11-foreign.c
@@ -160,7 +160,7 @@ main (int argc, char **argv)
fb = COGL_FRAMEBUFFER (onscreen);
cogl_onscreen_set_resizable (onscreen, TRUE);
- cogl_onscreen_add_resize_handler (onscreen, resize_handler, onscreen);
+ cogl_onscreen_add_resize_callback (onscreen, resize_handler, onscreen, NULL);
triangle = cogl_primitive_new_p2c4 (ctx, COGL_VERTICES_MODE_TRIANGLES,
3, triangle_vertices);