diff options
Diffstat (limited to 'sway/handlers.c')
-rw-r--r-- | sway/handlers.c | 54 |
1 files changed, 19 insertions, 35 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index cec63192..7d4ea263 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -706,38 +706,22 @@ static void handle_wlc_ready(void) { | |||
706 | } | 706 | } |
707 | } | 707 | } |
708 | 708 | ||
709 | struct wlc_interface interface = { | 709 | void register_wlc_handlers() { |
710 | .output = { | 710 | wlc_set_output_created_cb(handle_output_created); |
711 | .created = handle_output_created, | 711 | wlc_set_output_destroyed_cb(handle_output_destroyed); |
712 | .destroyed = handle_output_destroyed, | 712 | wlc_set_output_resolution_cb(handle_output_resolution_change); |
713 | .resolution = handle_output_resolution_change, | 713 | wlc_set_output_focus_cb(handle_output_focused); |
714 | .focus = handle_output_focused, | 714 | wlc_set_output_render_pre_cb(handle_output_pre_render); |
715 | .render = { | 715 | wlc_set_output_render_post_cb(handle_output_post_render); |
716 | .pre = handle_output_pre_render, | 716 | wlc_set_view_created_cb(handle_view_created); |
717 | .post = handle_output_post_render | 717 | wlc_set_view_destroyed_cb(handle_view_destroyed); |
718 | } | 718 | wlc_set_view_focus_cb(handle_view_focus); |
719 | }, | 719 | wlc_set_view_request_geometry_cb(handle_view_geometry_request); |
720 | .view = { | 720 | wlc_set_view_request_state_cb(handle_view_state_request); |
721 | .created = handle_view_created, | 721 | wlc_set_keyboard_key_cb(handle_key); |
722 | .destroyed = handle_view_destroyed, | 722 | wlc_set_pointer_motion_cb(handle_pointer_motion); |
723 | .focus = handle_view_focus, | 723 | wlc_set_pointer_button_cb(handle_pointer_button); |
724 | .request = { | 724 | wlc_set_compositor_ready_cb(handle_wlc_ready); |
725 | .geometry = handle_view_geometry_request, | 725 | wlc_set_input_created_cb(handle_input_created); |
726 | .state = handle_view_state_request | 726 | wlc_set_input_destroyed_cb(handle_input_destroyed); |
727 | } | 727 | } |
728 | }, | ||
729 | .keyboard = { | ||
730 | .key = handle_key | ||
731 | }, | ||
732 | .pointer = { | ||
733 | .motion = handle_pointer_motion, | ||
734 | .button = handle_pointer_button | ||
735 | }, | ||
736 | .compositor = { | ||
737 | .ready = handle_wlc_ready | ||
738 | }, | ||
739 | .input = { | ||
740 | .created = handle_input_created, | ||
741 | .destroyed = handle_input_destroyed | ||
742 | } | ||
743 | }; | ||