diff --git a/examples/compositor.c b/examples/compositor.c index d12529942..fb00032a7 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);