aboutsummaryrefslogtreecommitdiff
path: root/example/simple.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-06-20 17:54:33 -0400
committerGitHub <noreply@github.com>2017-06-20 17:54:33 -0400
commit33f2c66fca6e8a628fe3f36d1abacf87226042de (patch)
tree1381f243d1bb9df41691e2b92593a8495bb80f37 /example/simple.c
parent2f03ea0a6bea6c099f148eb745a725ca77813885 (diff)
parentb9d36c8149536cff1aa229f59337dcfa2f70a37b (diff)
Merge pull request #17 from nyorain/wayland-backend
Basic Wayland backend
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);
}