diff options
author | Alexander Orzechowski <orzechowski.alexander@gmail.com> | 2022-08-18 07:16:16 -0400 |
---|---|---|
committer | Alexander Orzechowski <orzechowski.alexander@gmail.com> | 2022-08-18 07:16:16 -0400 |
commit | ef4baea0e2f799c7bdd2e077dac4174fa31e85df (patch) | |
tree | d71e1399e64b9e5bcdda1d52246c90eca15cf150 /backend/libinput/pointer.c | |
parent | 013f121f455efcc1e68e98c60c74aadfb51fd98e (diff) |
Use wl_signal_emit_mutable
Diffstat (limited to 'backend/libinput/pointer.c')
-rw-r--r-- | backend/libinput/pointer.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/backend/libinput/pointer.c b/backend/libinput/pointer.c index 841d3dfc..48f8ae12 100644 --- a/backend/libinput/pointer.c +++ b/backend/libinput/pointer.c @@ -2,7 +2,6 @@ #include <libinput.h> #include <wlr/interfaces/wlr_pointer.h> #include "backend/libinput.h" -#include "util/signal.h" const struct wlr_pointer_impl libinput_pointer_impl = { .name = "libinput-pointer", @@ -37,8 +36,8 @@ void handle_pointer_motion(struct libinput_event *event, wlr_event.delta_y = libinput_event_pointer_get_dy(pevent); wlr_event.unaccel_dx = libinput_event_pointer_get_dx_unaccelerated(pevent); wlr_event.unaccel_dy = libinput_event_pointer_get_dy_unaccelerated(pevent); - wlr_signal_emit_safe(&pointer->events.motion, &wlr_event); - wlr_signal_emit_safe(&pointer->events.frame, pointer); + wl_signal_emit_mutable(&pointer->events.motion, &wlr_event); + wl_signal_emit_mutable(&pointer->events.frame, pointer); } void handle_pointer_motion_abs(struct libinput_event *event, @@ -51,8 +50,8 @@ void handle_pointer_motion_abs(struct libinput_event *event, usec_to_msec(libinput_event_pointer_get_time_usec(pevent)); wlr_event.x = libinput_event_pointer_get_absolute_x_transformed(pevent, 1); wlr_event.y = libinput_event_pointer_get_absolute_y_transformed(pevent, 1); - wlr_signal_emit_safe(&pointer->events.motion_absolute, &wlr_event); - wlr_signal_emit_safe(&pointer->events.frame, pointer); + wl_signal_emit_mutable(&pointer->events.motion_absolute, &wlr_event); + wl_signal_emit_mutable(&pointer->events.frame, pointer); } void handle_pointer_button(struct libinput_event *event, @@ -72,8 +71,8 @@ void handle_pointer_button(struct libinput_event *event, wlr_event.state = WLR_BUTTON_RELEASED; break; } - wlr_signal_emit_safe(&pointer->events.button, &wlr_event); - wlr_signal_emit_safe(&pointer->events.frame, pointer); + wl_signal_emit_mutable(&pointer->events.button, &wlr_event); + wl_signal_emit_mutable(&pointer->events.frame, pointer); } void handle_pointer_axis(struct libinput_event *event, @@ -120,9 +119,9 @@ void handle_pointer_axis(struct libinput_event *event, wlr_event.delta_discrete = libinput_event_pointer_get_axis_value_discrete(pevent, axes[i]); wlr_event.delta_discrete *= WLR_POINTER_AXIS_DISCRETE_STEP; - wlr_signal_emit_safe(&pointer->events.axis, &wlr_event); + wl_signal_emit_mutable(&pointer->events.axis, &wlr_event); } - wlr_signal_emit_safe(&pointer->events.frame, pointer); + wl_signal_emit_mutable(&pointer->events.frame, pointer); } #if LIBINPUT_HAS_SCROLL_VALUE120 @@ -158,9 +157,9 @@ void handle_pointer_axis_value120(struct libinput_event *event, wlr_event.delta_discrete = libinput_event_pointer_get_scroll_value_v120(pevent, axes[i]); } - wlr_signal_emit_safe(&pointer->events.axis, &wlr_event); + wl_signal_emit_mutable(&pointer->events.axis, &wlr_event); } - wlr_signal_emit_safe(&pointer->events.frame, pointer); + wl_signal_emit_mutable(&pointer->events.frame, pointer); } #endif @@ -174,7 +173,7 @@ void handle_pointer_swipe_begin(struct libinput_event *event, usec_to_msec(libinput_event_gesture_get_time_usec(gevent)), .fingers = libinput_event_gesture_get_finger_count(gevent), }; - wlr_signal_emit_safe(&pointer->events.swipe_begin, &wlr_event); + wl_signal_emit_mutable(&pointer->events.swipe_begin, &wlr_event); } void handle_pointer_swipe_update(struct libinput_event *event, @@ -189,7 +188,7 @@ void handle_pointer_swipe_update(struct libinput_event *event, .dx = libinput_event_gesture_get_dx(gevent), .dy = libinput_event_gesture_get_dy(gevent), }; - wlr_signal_emit_safe(&pointer->events.swipe_update, &wlr_event); + wl_signal_emit_mutable(&pointer->events.swipe_update, &wlr_event); } void handle_pointer_swipe_end(struct libinput_event *event, @@ -202,7 +201,7 @@ void handle_pointer_swipe_end(struct libinput_event *event, usec_to_msec(libinput_event_gesture_get_time_usec(gevent)), .cancelled = libinput_event_gesture_get_cancelled(gevent), }; - wlr_signal_emit_safe(&pointer->events.swipe_end, &wlr_event); + wl_signal_emit_mutable(&pointer->events.swipe_end, &wlr_event); } void handle_pointer_pinch_begin(struct libinput_event *event, @@ -215,7 +214,7 @@ void handle_pointer_pinch_begin(struct libinput_event *event, usec_to_msec(libinput_event_gesture_get_time_usec(gevent)), .fingers = libinput_event_gesture_get_finger_count(gevent), }; - wlr_signal_emit_safe(&pointer->events.pinch_begin, &wlr_event); + wl_signal_emit_mutable(&pointer->events.pinch_begin, &wlr_event); } void handle_pointer_pinch_update(struct libinput_event *event, @@ -232,7 +231,7 @@ void handle_pointer_pinch_update(struct libinput_event *event, .scale = libinput_event_gesture_get_scale(gevent), .rotation = libinput_event_gesture_get_angle_delta(gevent), }; - wlr_signal_emit_safe(&pointer->events.pinch_update, &wlr_event); + wl_signal_emit_mutable(&pointer->events.pinch_update, &wlr_event); } void handle_pointer_pinch_end(struct libinput_event *event, @@ -245,7 +244,7 @@ void handle_pointer_pinch_end(struct libinput_event *event, usec_to_msec(libinput_event_gesture_get_time_usec(gevent)), .cancelled = libinput_event_gesture_get_cancelled(gevent), }; - wlr_signal_emit_safe(&pointer->events.pinch_end, &wlr_event); + wl_signal_emit_mutable(&pointer->events.pinch_end, &wlr_event); } void handle_pointer_hold_begin(struct libinput_event *event, @@ -258,7 +257,7 @@ void handle_pointer_hold_begin(struct libinput_event *event, usec_to_msec(libinput_event_gesture_get_time_usec(gevent)), .fingers = libinput_event_gesture_get_finger_count(gevent), }; - wlr_signal_emit_safe(&pointer->events.hold_begin, &wlr_event); + wl_signal_emit_mutable(&pointer->events.hold_begin, &wlr_event); } void handle_pointer_hold_end(struct libinput_event *event, @@ -271,5 +270,5 @@ void handle_pointer_hold_end(struct libinput_event *event, usec_to_msec(libinput_event_gesture_get_time_usec(gevent)), .cancelled = libinput_event_gesture_get_cancelled(gevent), }; - wlr_signal_emit_safe(&pointer->events.hold_end, &wlr_event); + wl_signal_emit_mutable(&pointer->events.hold_end, &wlr_event); } |