aboutsummaryrefslogtreecommitdiffstats
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
parentf209dead7d9419b457e8db89662a16ff26939867 (diff)
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>
-rw-r--r--recipes/wayland/weston/0001-Adapt-changes-made-in-libinput-src-evdev.c-for-touch.patch65
-rw-r--r--recipes/wayland/weston_1.%.bbappend27
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 00000000..1bb9253d
--- /dev/null
+++ b/recipes/wayland/weston/0001-Adapt-changes-made-in-libinput-src-evdev.c-for-touch.patch
@@ -0,0 +1,65 @@
+From c4633014fff25d32926129a8b028124c6338bb2b Mon Sep 17 00:00:00 2001
+From: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
+Date: Wed, 19 Aug 2015 09:04:46 +0300
+Subject: [PATCH 1/1] Adapt changes made in libinput/src/evdev.c for touch
+ frame emission.
+
+---
+ src/evdev.c | 27 +++++++++++++++++++++++++++
+ 1 file changed, 27 insertions(+)
+
+diff --git a/src/evdev.c b/src/evdev.c
+index 888dfbd..daa5d72 100644
+--- a/src/evdev.c
++++ b/src/evdev.c
+@@ -359,12 +359,36 @@ evdev_process_absolute(struct evdev_device *device,
+ }
+ }
+
++static inline int
++evdev_need_touch_frame(struct evdev_device *device)
++{
++ if (!(device->seat_caps & EVDEV_SEAT_TOUCH))
++ return 0;
++
++ switch (device->pending_event) {
++ case EVDEV_NONE:
++ case EVDEV_RELATIVE_MOTION:
++ break;
++ case EVDEV_ABSOLUTE_MT_DOWN:
++ case EVDEV_ABSOLUTE_MT_MOTION:
++ case EVDEV_ABSOLUTE_MT_UP:
++ case EVDEV_ABSOLUTE_TOUCH_DOWN:
++ case EVDEV_ABSOLUTE_TOUCH_UP:
++ case EVDEV_ABSOLUTE_MOTION:
++ return 1;
++ }
++
++ return 0;
++}
++
+ static void
+ fallback_process(struct evdev_dispatch *dispatch,
+ struct evdev_device *device,
+ struct input_event *event,
+ uint32_t time)
+ {
++ int need_frame = 0;
++
+ switch (event->type) {
+ case EV_REL:
+ evdev_process_relative(device, event, time);
+@@ -376,7 +400,10 @@ fallback_process(struct evdev_dispatch *dispatch,
+ evdev_process_key(device, event, time);
+ break;
+ case EV_SYN:
++ need_frame = evdev_need_touch_frame(device);
+ evdev_flush_pending_event(device, time);
++ if (need_frame)
++ notify_touch_frame(device->seat);
+ break;
+ }
+ }
+--
+2.1.4
+
diff --git a/recipes/wayland/weston_1.%.bbappend b/recipes/wayland/weston_1.%.bbappend
new file mode 100644
index 00000000..c3aa1849
--- /dev/null
+++ b/recipes/wayland/weston_1.%.bbappend
@@ -0,0 +1,27 @@
+#############################################################################
+##
+## Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies).
+##
+## This file is part of the Qt Enterprise Embedded Scripts of the Qt
+## framework.
+##
+## $QT_BEGIN_LICENSE$
+## Commercial License Usage Only
+## Licensees holding valid commercial Qt license agreements with Digia
+## with an appropriate addendum covering the Qt Enterprise Embedded Scripts,
+## may use this file in accordance with the terms contained in said license
+## agreement.
+##
+## For further information use the contact form at
+## http://www.qt.io/contact-us.
+##
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+SRC_URI_append = " \
+file://0001-Adapt-changes-made-in-libinput-src-evdev.c-for-touch.patch \
+"
+