diff options
-rw-r--r-- | recipes/wayland/weston/0001-Adapt-changes-made-in-libinput-src-evdev.c-for-touch.patch | 65 | ||||
-rw-r--r-- | recipes/wayland/weston_1.%.bbappend | 27 |
2 files changed, 92 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 @@ | |||
1 | From c4633014fff25d32926129a8b028124c6338bb2b Mon Sep 17 00:00:00 2001 | ||
2 | From: Louai Al-Khanji <louai.al-khanji@theqtcompany.com> | ||
3 | Date: Wed, 19 Aug 2015 09:04:46 +0300 | ||
4 | Subject: [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 | |||
11 | diff --git a/src/evdev.c b/src/evdev.c | ||
12 | index 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 | -- | ||
64 | 2.1.4 | ||
65 | |||
diff --git a/recipes/wayland/weston_1.%.bbappend b/recipes/wayland/weston_1.%.bbappend new file mode 100644 index 0000000..c3aa184 --- /dev/null +++ b/recipes/wayland/weston_1.%.bbappend | |||
@@ -0,0 +1,27 @@ | |||
1 | ############################################################################# | ||
2 | ## | ||
3 | ## Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies). | ||
4 | ## | ||
5 | ## This file is part of the Qt Enterprise Embedded Scripts of the Qt | ||
6 | ## framework. | ||
7 | ## | ||
8 | ## $QT_BEGIN_LICENSE$ | ||
9 | ## Commercial License Usage Only | ||
10 | ## Licensees holding valid commercial Qt license agreements with Digia | ||
11 | ## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, | ||
12 | ## may use this file in accordance with the terms contained in said license | ||
13 | ## agreement. | ||
14 | ## | ||
15 | ## For further information use the contact form at | ||
16 | ## http://www.qt.io/contact-us. | ||
17 | ## | ||
18 | ## | ||
19 | ## $QT_END_LICENSE$ | ||
20 | ## | ||
21 | ############################################################################# | ||
22 | |||
23 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
24 | SRC_URI_append = " \ | ||
25 | file://0001-Adapt-changes-made-in-libinput-src-evdev.c-for-touch.patch \ | ||
26 | " | ||
27 | |||