aboutsummaryrefslogtreecommitdiff
path: root/example/simple.c
diff options
context:
space:
mode:
Diffstat (limited to 'example/simple.c')
-rw-r--r--example/simple.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/example/simple.c b/example/simple.c
index 5a5a1300..f3a66db9 100644
--- a/example/simple.c
+++ b/example/simple.c
@@ -50,11 +50,11 @@ int main() {
.color = { 1.0, 0.0, 0.0 },
.dec = 0,
};
- struct compositor_state compositor;
-
+ struct compositor_state compositor = { 0,
+ .data = &state,
+ .output_frame_cb = handle_output_frame,
+ .keyboard_key_cb = handle_keyboard_key,
+ };
compositor_init(&compositor);
- compositor.output_frame_cb = handle_output_frame;
- compositor.keyboard_key_cb = handle_keyboard_key;
- compositor.data = &state;
compositor_run(&compositor);
}