From c55a2624c8ba9b980cba1e6670530f52794e7025 Mon Sep 17 00:00:00 2001 From: Hannes Winkler Date: Sat, 31 Oct 2020 16:29:37 +0100 Subject: [PATCH 1/2] fix libinput segfault --- src/flutter-pi.c | 15 +++++++-------- third_party/aasdk | 1 + 2 files changed, 8 insertions(+), 8 deletions(-) create mode 160000 third_party/aasdk diff --git a/src/flutter-pi.c b/src/flutter-pi.c index 5f8613e6..4ac703c8 100644 --- a/src/flutter-pi.c +++ b/src/flutter-pi.c @@ -1889,6 +1889,11 @@ static void libinput_interface_on_close(int fd, void *userdata) { close(fd); } +const struct libinput_interface flutterpi_libinput_interface = { + .open_restricted = libinput_interface_on_open, + .close_restricted = libinput_interface_on_close +}; + static int on_libinput_ready(sd_event_source *s, int fd, uint32_t revents, void *userdata) { struct libinput_event_keyboard *keyboard_event; struct libinput_event_pointer *pointer_event; @@ -2360,10 +2365,7 @@ static struct libinput *try_create_udev_backed_libinput(void) { } libinput = libinput_udev_create_context( - &(const struct libinput_interface) { - .open_restricted = libinput_interface_on_open, - .close_restricted = libinput_interface_on_close - }, + &flutterpi_libinput_interface, udev, udev ); @@ -2391,10 +2393,7 @@ static struct libinput *try_create_path_backed_libinput(void) { struct libinput *libinput; libinput = libinput_path_create_context( - &(const struct libinput_interface) { - .open_restricted = libinput_interface_on_open, - .close_restricted = libinput_interface_on_close - }, + &flutterpi_libinput_interface, NULL ); if (libinput == NULL) { diff --git a/third_party/aasdk b/third_party/aasdk new file mode 160000 index 00000000..b4484b41 --- /dev/null +++ b/third_party/aasdk @@ -0,0 +1 @@ +Subproject commit b4484b4147f9e6e8a1e694a1b4f0cd237ee97a17 From 61a8de57c6b467d49fec9c685a5ccbe27a063c6b Mon Sep 17 00:00:00 2001 From: Hannes Winkler Date: Sat, 31 Oct 2020 16:31:03 +0100 Subject: [PATCH 2/2] delete aasdk again --- third_party/aasdk | 1 - 1 file changed, 1 deletion(-) delete mode 160000 third_party/aasdk diff --git a/third_party/aasdk b/third_party/aasdk deleted file mode 160000 index b4484b41..00000000 --- a/third_party/aasdk +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b4484b4147f9e6e8a1e694a1b4f0cd237ee97a17