diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2019-11-16 11:56:29 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2019-11-20 22:20:41 +0100 |
commit | 67717e9236ac04143c28b36b41acb39a3e9dc5c0 (patch) | |
tree | fef15120729183e1d62c02736994a7fae0f6e9fa /dev-qt | |
parent | dev-qt/qtmultimedia: Fix crash if video sink is used when destroyed (diff) | |
download | gentoo-67717e9236ac04143c28b36b41acb39a3e9dc5c0.tar.gz gentoo-67717e9236ac04143c28b36b41acb39a3e9dc5c0.tar.bz2 gentoo-67717e9236ac04143c28b36b41acb39a3e9dc5c0.zip |
dev-qt/qtwayland: Fix touch ignored if down and motion in same frame
Package-Manager: Portage-2.3.79, Repoman-2.3.17
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'dev-qt')
-rw-r--r-- | dev-qt/qtwayland/files/qtwayland-5.13.2-fix-touch-ignored.patch | 36 | ||||
-rw-r--r-- | dev-qt/qtwayland/qtwayland-5.13.2-r1.ebuild | 47 |
2 files changed, 83 insertions, 0 deletions
diff --git a/dev-qt/qtwayland/files/qtwayland-5.13.2-fix-touch-ignored.patch b/dev-qt/qtwayland/files/qtwayland-5.13.2-fix-touch-ignored.patch new file mode 100644 index 000000000000..4a33d97bf17e --- /dev/null +++ b/dev-qt/qtwayland/files/qtwayland-5.13.2-fix-touch-ignored.patch @@ -0,0 +1,36 @@ +From 57c28f461a066c03ef8ae3f823c040fa91876fb8 Mon Sep 17 00:00:00 2001 +From: Johan Klokkhammer Helsing <johan.helsing@qt.io> +Date: Mon, 4 Nov 2019 14:21:18 +0100 +Subject: [PATCH] Fix touch being ignored when down and motion are in the same + frame + +The Wayland protocol gives no guarantees about which events are part of a +frame, so handle the case where we receive wl_touch.down and wl_touch.motion +within the same frame. + +Fixes: QTBUG-79744 +Change-Id: I5dd9302576d81da38e003c8e7e74da6a98def603 +Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> +--- + src/client/qwaylandinputdevice.cpp | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp +index 8f3df8e4d..193ce714b 100644 +--- a/src/client/qwaylandinputdevice.cpp ++++ b/src/client/qwaylandinputdevice.cpp +@@ -1062,7 +1062,10 @@ void QWaylandInputDevice::handleTouchPoint(int id, Qt::TouchPointState state, co + tp.area.moveCenter(globalPosition); + } + +- tp.state = state; ++ // If the touch point was pressed earlier this frame, we don't want to overwrite its state. ++ if (tp.state != Qt::TouchPointPressed) ++ tp.state = state; ++ + tp.pressure = tp.state == Qt::TouchPointReleased ? 0 : 1; + } + +-- +2.16.3 + diff --git a/dev-qt/qtwayland/qtwayland-5.13.2-r1.ebuild b/dev-qt/qtwayland/qtwayland-5.13.2-r1.ebuild new file mode 100644 index 000000000000..23b38b6f8d7e --- /dev/null +++ b/dev-qt/qtwayland/qtwayland-5.13.2-r1.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit qt5-build + +DESCRIPTION="Wayland platform plugin for Qt" + +if [[ ${QT5_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86" +fi + +IUSE="+libinput xcomposite" + +DEPEND=" + >=dev-libs/wayland-1.6.0 + ~dev-qt/qtcore-${PV} + ~dev-qt/qtdeclarative-${PV} + ~dev-qt/qtgui-${PV}[egl,libinput=] + media-libs/mesa[egl] + >=x11-libs/libxkbcommon-0.2.0 + xcomposite? ( + x11-libs/libX11 + x11-libs/libXcomposite + ) +" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${P}-fix-touch-ignored.patch" # QTBUG-79744 +) + +src_prepare() { + qt_use_disable_config libinput xkbcommon-evdev \ + src/client/client.pro \ + src/compositor/wayland_wrapper/wayland_wrapper.pri \ + src/plugins/shellintegration/ivi-shell/ivi-shell.pro \ + src/plugins/shellintegration/wl-shell/wl-shell.pro \ + src/plugins/shellintegration/xdg-shell/xdg-shell.pro \ + src/plugins/shellintegration/xdg-shell-v5/xdg-shell-v5.pro \ + src/plugins/shellintegration/xdg-shell-v6/xdg-shell-v6.pro \ + tests/auto/compositor/compositor/compositor.pro + + use xcomposite || rm -r config.tests/xcomposite || die + + qt5-build_src_prepare +} |