Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/kde:master commit in: kde-apps/konsole/files/, kde-apps/konsole/
Date: Thu, 08 Feb 2018 00:14:24
Message-Id: 1518048847.140d0b7b372c6c9060be89e07959aa017869f7c7.asturm@gentoo
1 commit: 140d0b7b372c6c9060be89e07959aa017869f7c7
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 7 16:02:45 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 8 00:14:07 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=140d0b7b
7
8 kde-apps/konsole: Fix mouse wheel scrolling w/ libinput
9
10 KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=386762
11 Package-Manager: Portage-2.3.24, Repoman-2.3.6
12
13 .../konsole-17.12.1-libinput-pixeldelta.patch | 54 ++++++++++++++++++++++
14 kde-apps/konsole/konsole-17.12.2.ebuild | 2 +
15 kde-apps/konsole/konsole-17.12.49.9999.ebuild | 2 +
16 3 files changed, 58 insertions(+)
17
18 diff --git a/kde-apps/konsole/files/konsole-17.12.1-libinput-pixeldelta.patch b/kde-apps/konsole/files/konsole-17.12.1-libinput-pixeldelta.patch
19 new file mode 100644
20 index 0000000000..37049b9b2f
21 --- /dev/null
22 +++ b/kde-apps/konsole/files/konsole-17.12.1-libinput-pixeldelta.patch
23 @@ -0,0 +1,54 @@
24 +From d25e5ac7089f2c81cc5ffe8e155ba8b3dfb11b97 Mon Sep 17 00:00:00 2001
25 +From: Kurt Hindenburg <kurt.hindenburg@×××××.com>
26 +Date: Wed, 7 Feb 2018 10:38:09 -0500
27 +Subject: Fix mouse wheel scrolling with libinput
28 +
29 +If the Libinput X server input driver is used we get a value for
30 +pixelDelta for a physical mouse wheel scroll, so we check that the
31 +source of the wheel event is actually a mouse, this was fixed in
32 +Qt 5.9.5*
33 +https://bugreports.qt.io/browse/QTBUG-59261
34 +
35 +Patch by ahmadsamir
36 +
37 +* fixed in Gentoo: Qt 5.9.4
38 +
39 +BUG: 386762
40 +Differential Revision: https://phabricator.kde.org/D9008
41 +---
42 + src/ScrollState.cpp | 19 +++++++++++++++----
43 + 1 file changed, 15 insertions(+), 4 deletions(-)
44 +
45 +diff --git a/src/ScrollState.cpp b/src/ScrollState.cpp
46 +index e5b486d..f71b142 100644
47 +--- a/src/ScrollState.cpp
48 ++++ b/src/ScrollState.cpp
49 +@@ -25,10 +25,21 @@ using namespace Konsole;
50 +
51 + void ScrollState::addWheelEvent(const QWheelEvent *wheel)
52 + {
53 +- if ((wheel->angleDelta().y() != 0) && (wheel->pixelDelta().y() == 0)) {
54 +- _remainingScrollPixel = 0;
55 +- } else {
56 +- _remainingScrollPixel += wheel->pixelDelta().y();
57 ++ // If the Libinput X server input driver is used we get a value for
58 ++ // pixelDelta for a physical mouse wheel scroll, so we check that
59 ++ // the source of the wheel event is actually a mouse, this has been
60 ++ // fixed upstream in Qt 5.9.5: https://bugreports.qt.io/browse/QTBUG-59261
61 ++ // Fixes Konsole BUG: https://bugs.kde.org/show_bug.cgi?id=386762
62 ++#if (QT_VERSION < QT_VERSION_CHECK(5, 9, 4))
63 ++ if (wheel->source() != Qt::MouseEventNotSynthesized) {
64 ++#else
65 ++ if (true) {
66 ++#endif
67 ++ if ((wheel->angleDelta().y() != 0) && (wheel->pixelDelta().y() == 0)) {
68 ++ _remainingScrollPixel = 0;
69 ++ } else {
70 ++ _remainingScrollPixel += wheel->pixelDelta().y();
71 ++ }
72 + }
73 + _remainingScrollAngle += wheel->angleDelta().y();
74 + }
75 +--
76 +cgit v0.11.2
77 +
78
79 diff --git a/kde-apps/konsole/konsole-17.12.2.ebuild b/kde-apps/konsole/konsole-17.12.2.ebuild
80 index c091c44e38..13661d1d26 100644
81 --- a/kde-apps/konsole/konsole-17.12.2.ebuild
82 +++ b/kde-apps/konsole/konsole-17.12.2.ebuild
83 @@ -47,6 +47,8 @@ DEPEND="
84 "
85 RDEPEND="${DEPEND}"
86
87 +PATCHES=( "${FILESDIR}/${PN}-17.12.1-libinput-pixeldelta.patch" )
88 +
89 src_configure() {
90 local mycmakeargs=(
91 $(cmake-utils_use_find_package X X11)
92
93 diff --git a/kde-apps/konsole/konsole-17.12.49.9999.ebuild b/kde-apps/konsole/konsole-17.12.49.9999.ebuild
94 index da3754de86..91bdb3a97d 100644
95 --- a/kde-apps/konsole/konsole-17.12.49.9999.ebuild
96 +++ b/kde-apps/konsole/konsole-17.12.49.9999.ebuild
97 @@ -47,6 +47,8 @@ DEPEND="
98 "
99 RDEPEND="${DEPEND}"
100
101 +PATCHES=( "${FILESDIR}/${PN}-17.12.1-libinput-pixeldelta.patch" )
102 +
103 src_configure() {
104 local mycmakeargs=(
105 $(cmake-utils_use_find_package X X11)