summaryrefslogtreecommitdiffstats
path: root/recipes/wayland/weston/0001-Adapt-changes-made-in-libinput-src-evdev.c-for-touch.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/wayland/weston/0001-Adapt-changes-made-in-libinput-src-evdev.c-for-touch.patch')
-rw-r--r--recipes/wayland/weston/0001-Adapt-changes-made-in-libinput-src-evdev.c-for-touch.patch65
1 files changed, 0 insertions, 65 deletions
diff --git a/recipes/wayland/weston/0001-Adapt-changes-made-in-libinput-src-evdev.c-for-touch.patch b/recipes/wayland/weston/0001-Adapt-changes-made-in-libinput-src-evdev.c-for-touch.patch
deleted file mode 100644
index 1bb9253..0000000
--- a/recipes/wayland/weston/0001-Adapt-changes-made-in-libinput-src-evdev.c-for-touch.patch
+++ /dev/null
@@ -1,65 +0,0 @@
1From c4633014fff25d32926129a8b028124c6338bb2b Mon Sep 17 00:00:00 2001
2From: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
3Date: Wed, 19 Aug 2015 09:04:46 +0300
4Subject: [PATCH 1/1] Adapt changes made in libinput/src/evdev.c for touch
5 frame emission.
6
7---
8 src/evdev.c | 27 +++++++++++++++++++++++++++
9 1 file changed, 27 insertions(+)
10
11diff --git a/src/evdev.c b/src/evdev.c
12index 888dfbd..daa5d72 100644
13--- a/src/evdev.c
14+++ b/src/evdev.c
15@@ -359,12 +359,36 @@ evdev_process_absolute(struct evdev_device *device,
16 }
17 }
18
19+static inline int
20+evdev_need_touch_frame(struct evdev_device *device)
21+{
22+ if (!(device->seat_caps & EVDEV_SEAT_TOUCH))
23+ return 0;
24+
25+ switch (device->pending_event) {
26+ case EVDEV_NONE:
27+ case EVDEV_RELATIVE_MOTION:
28+ break;
29+ case EVDEV_ABSOLUTE_MT_DOWN:
30+ case EVDEV_ABSOLUTE_MT_MOTION:
31+ case EVDEV_ABSOLUTE_MT_UP:
32+ case EVDEV_ABSOLUTE_TOUCH_DOWN:
33+ case EVDEV_ABSOLUTE_TOUCH_UP:
34+ case EVDEV_ABSOLUTE_MOTION:
35+ return 1;
36+ }
37+
38+ return 0;
39+}
40+
41 static void
42 fallback_process(struct evdev_dispatch *dispatch,
43 struct evdev_device *device,
44 struct input_event *event,
45 uint32_t time)
46 {
47+ int need_frame = 0;
48+
49 switch (event->type) {
50 case EV_REL:
51 evdev_process_relative(device, event, time);
52@@ -376,7 +400,10 @@ fallback_process(struct evdev_dispatch *dispatch,
53 evdev_process_key(device, event, time);
54 break;
55 case EV_SYN:
56+ need_frame = evdev_need_touch_frame(device);
57 evdev_flush_pending_event(device, time);
58+ if (need_frame)
59+ notify_touch_frame(device->seat);
60 break;
61 }
62 }
63--
642.1.4
65