summaryrefslogtreecommitdiffstats
path: root/recipes/wayland/weston/0001-Adapt-changes-made-in-libinput-src-evdev.c-for-touch.patch
diff options
context:
space:
mode:
authorLouai Al-Khanji <louai.al-khanji@theqtcompany.com>2015-08-19 09:59:51 +0300
committerLouai Al-Khanji <louai.al-khanji@theqtcompany.com>2015-08-19 07:40:15 +0000
commit17dd65fe3e5774a5c55124d169646e87d86dbce1 (patch)
tree4617d9773e41be848dfc3d34d1c9cd7d4d143727 /recipes/wayland/weston/0001-Adapt-changes-made-in-libinput-src-evdev.c-for-touch.patch
parentf209dead7d9419b457e8db89662a16ff26939867 (diff)
downloadmeta-boot2qt-17dd65fe3e5774a5c55124d169646e87d86dbce1.tar.gz
Add touch_frame events to Weston 1.5.0
Otherwise no Qt applications react on touch. This issue was eventually resolved upstream by dropping the built-in evdev backend and relying on libinput exclusively, where it is fixed. The libinput backend is required since Weston 1.7. In 1.6 the libinput backend was made the default, but the old backend was still there. Thus this fix also applies to Weston 1.6. Task-number: QTEE-831 Change-Id: Ib089136723b7b1dc6f760b5eedb12d7b8a50abbc Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
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, 65 insertions, 0 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
new file mode 100644
index 0000000..1bb9253
--- /dev/null
+++ b/recipes/wayland/weston/0001-Adapt-changes-made-in-libinput-src-evdev.c-for-touch.patch
@@ -0,0 +1,65 @@
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