aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-08-20 09:31:24 -0400
committerGitHub <noreply@github.com>2017-08-20 09:31:24 -0400
commit9f6c8e6288470aeae0076d4849a17a3aca44b000 (patch)
treed2c9824d4f2b424a4ffc65abbe2e5eb05d761dce /examples
parentb56f15bca7e4671e064c41b6f1323247ea8fc6cf (diff)
parent2948f537218fea3a9ae969bcdc0df063f659ce45 (diff)
Merge pull request #118 from martinetd/delay_handle_keyboard_cb
example compositor: handle keyboard after we're done with init
Diffstat (limited to 'examples')
-rw-r--r--examples/compositor.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/compositor.c b/examples/compositor.c
index d1252994..fb00032a 100644
--- a/examples/compositor.c
+++ b/examples/compositor.c
@@ -143,7 +143,6 @@ int main() {
struct compositor_state compositor = { 0,
.data = &state,
.output_frame_cb = handle_output_frame,
- .keyboard_key_cb = handle_keyboard_key
};
compositor_init(&compositor);
@@ -178,6 +177,8 @@ int main() {
break;
}
+ compositor.keyboard_key_cb = handle_keyboard_key;
+
wl_display_run(compositor.display);
close(state.keymap_fd);