Use wl_signal_emit_mutable

This commit is contained in:
Alexander Orzechowski 2022-08-18 07:16:16 -04:00
parent 013f121f45
commit ef4baea0e2
91 changed files with 365 additions and 456 deletions

View file

@ -2,7 +2,6 @@
#include <libinput.h>
#include <wlr/interfaces/wlr_touch.h>
#include "backend/libinput.h"
#include "util/signal.h"
const struct wlr_touch_impl libinput_touch_impl = {
.name = "libinput-touch",
@ -39,7 +38,7 @@ void handle_touch_down(struct libinput_event *event,
wlr_event.touch_id = libinput_event_touch_get_seat_slot(tevent);
wlr_event.x = libinput_event_touch_get_x_transformed(tevent, 1);
wlr_event.y = libinput_event_touch_get_y_transformed(tevent, 1);
wlr_signal_emit_safe(&touch->events.down, &wlr_event);
wl_signal_emit_mutable(&touch->events.down, &wlr_event);
}
void handle_touch_up(struct libinput_event *event,
@ -51,7 +50,7 @@ void handle_touch_up(struct libinput_event *event,
wlr_event.time_msec =
usec_to_msec(libinput_event_touch_get_time_usec(tevent));
wlr_event.touch_id = libinput_event_touch_get_seat_slot(tevent);
wlr_signal_emit_safe(&touch->events.up, &wlr_event);
wl_signal_emit_mutable(&touch->events.up, &wlr_event);
}
void handle_touch_motion(struct libinput_event *event,
@ -65,7 +64,7 @@ void handle_touch_motion(struct libinput_event *event,
wlr_event.touch_id = libinput_event_touch_get_seat_slot(tevent);
wlr_event.x = libinput_event_touch_get_x_transformed(tevent, 1);
wlr_event.y = libinput_event_touch_get_y_transformed(tevent, 1);
wlr_signal_emit_safe(&touch->events.motion, &wlr_event);
wl_signal_emit_mutable(&touch->events.motion, &wlr_event);
}
void handle_touch_cancel(struct libinput_event *event,
@ -77,10 +76,10 @@ void handle_touch_cancel(struct libinput_event *event,
wlr_event.time_msec =
usec_to_msec(libinput_event_touch_get_time_usec(tevent));
wlr_event.touch_id = libinput_event_touch_get_seat_slot(tevent);
wlr_signal_emit_safe(&touch->events.cancel, &wlr_event);
wl_signal_emit_mutable(&touch->events.cancel, &wlr_event);
}
void handle_touch_frame(struct libinput_event *event,
struct wlr_touch *touch) {
wlr_signal_emit_safe(&touch->events.frame, NULL);
wl_signal_emit_mutable(&touch->events.frame, NULL);
}