aboutsummaryrefslogtreecommitdiff
path: root/backend/libinput/pointer.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-02-12 09:12:31 +0100
committeremersion <contact@emersion.fr>2018-02-12 09:12:31 +0100
commit5e58d46cc1a90810e3ee76203cee8ca2f14fb462 (patch)
treea5019d87cdc121842ab7cf867fbcac0fde4ccff0 /backend/libinput/pointer.c
parent3497e53516d96ad67b26115e2e06218f68e1114d (diff)
Add wlr_signal_emit_safe
Diffstat (limited to 'backend/libinput/pointer.c')
-rw-r--r--backend/libinput/pointer.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/backend/libinput/pointer.c b/backend/libinput/pointer.c
index 13402ac2..f80f4f84 100644
--- a/backend/libinput/pointer.c
+++ b/backend/libinput/pointer.c
@@ -5,6 +5,7 @@
#include <wlr/types/wlr_input_device.h>
#include <wlr/interfaces/wlr_pointer.h>
#include <wlr/util/log.h>
+#include <wlr/util/signal.h>
#include "backend/libinput.h"
struct wlr_pointer *wlr_libinput_pointer_create(
@@ -35,7 +36,7 @@ void handle_pointer_motion(struct libinput_event *event,
usec_to_msec(libinput_event_pointer_get_time_usec(pevent));
wlr_event.delta_x = libinput_event_pointer_get_dx(pevent);
wlr_event.delta_y = libinput_event_pointer_get_dy(pevent);
- wl_signal_emit(&wlr_dev->pointer->events.motion, &wlr_event);
+ wlr_signal_emit_safe(&wlr_dev->pointer->events.motion, &wlr_event);
}
void handle_pointer_motion_abs(struct libinput_event *event,
@@ -55,7 +56,7 @@ void handle_pointer_motion_abs(struct libinput_event *event,
wlr_event.x_mm = libinput_event_pointer_get_absolute_x(pevent);
wlr_event.y_mm = libinput_event_pointer_get_absolute_y(pevent);
libinput_device_get_size(libinput_dev, &wlr_event.width_mm, &wlr_event.height_mm);
- wl_signal_emit(&wlr_dev->pointer->events.motion_absolute, &wlr_event);
+ wlr_signal_emit_safe(&wlr_dev->pointer->events.motion_absolute, &wlr_event);
}
void handle_pointer_button(struct libinput_event *event,
@@ -81,7 +82,7 @@ void handle_pointer_button(struct libinput_event *event,
wlr_event.state = WLR_BUTTON_RELEASED;
break;
}
- wl_signal_emit(&wlr_dev->pointer->events.button, &wlr_event);
+ wlr_signal_emit_safe(&wlr_dev->pointer->events.button, &wlr_event);
}
void handle_pointer_axis(struct libinput_event *event,
@@ -128,7 +129,7 @@ void handle_pointer_axis(struct libinput_event *event,
}
wlr_event.delta = libinput_event_pointer_get_axis_value(
pevent, axies[i]);
- wl_signal_emit(&wlr_dev->pointer->events.axis, &wlr_event);
+ wlr_signal_emit_safe(&wlr_dev->pointer->events.axis, &wlr_event);
}
}
}