Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-apps/konsole/, kde-apps/konsole/files/
Date: Thu, 08 Feb 2018 00:10:42
Message-Id: 1518048073.c93886a5ea884fffa1c01384e5e0873140a1b8e7.asturm@gentoo
1 commit: c93886a5ea884fffa1c01384e5e0873140a1b8e7
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:01:13 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c93886a5
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.1-r1.ebuild | 58 ++++++++++++++++++++++
15 2 files changed, 112 insertions(+)
16
17 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
18 new file mode 100644
19 index 00000000000..37049b9b2f2
20 --- /dev/null
21 +++ b/kde-apps/konsole/files/konsole-17.12.1-libinput-pixeldelta.patch
22 @@ -0,0 +1,54 @@
23 +From d25e5ac7089f2c81cc5ffe8e155ba8b3dfb11b97 Mon Sep 17 00:00:00 2001
24 +From: Kurt Hindenburg <kurt.hindenburg@×××××.com>
25 +Date: Wed, 7 Feb 2018 10:38:09 -0500
26 +Subject: Fix mouse wheel scrolling with libinput
27 +
28 +If the Libinput X server input driver is used we get a value for
29 +pixelDelta for a physical mouse wheel scroll, so we check that the
30 +source of the wheel event is actually a mouse, this was fixed in
31 +Qt 5.9.5*
32 +https://bugreports.qt.io/browse/QTBUG-59261
33 +
34 +Patch by ahmadsamir
35 +
36 +* fixed in Gentoo: Qt 5.9.4
37 +
38 +BUG: 386762
39 +Differential Revision: https://phabricator.kde.org/D9008
40 +---
41 + src/ScrollState.cpp | 19 +++++++++++++++----
42 + 1 file changed, 15 insertions(+), 4 deletions(-)
43 +
44 +diff --git a/src/ScrollState.cpp b/src/ScrollState.cpp
45 +index e5b486d..f71b142 100644
46 +--- a/src/ScrollState.cpp
47 ++++ b/src/ScrollState.cpp
48 +@@ -25,10 +25,21 @@ using namespace Konsole;
49 +
50 + void ScrollState::addWheelEvent(const QWheelEvent *wheel)
51 + {
52 +- if ((wheel->angleDelta().y() != 0) && (wheel->pixelDelta().y() == 0)) {
53 +- _remainingScrollPixel = 0;
54 +- } else {
55 +- _remainingScrollPixel += wheel->pixelDelta().y();
56 ++ // If the Libinput X server input driver is used we get a value for
57 ++ // pixelDelta for a physical mouse wheel scroll, so we check that
58 ++ // the source of the wheel event is actually a mouse, this has been
59 ++ // fixed upstream in Qt 5.9.5: https://bugreports.qt.io/browse/QTBUG-59261
60 ++ // Fixes Konsole BUG: https://bugs.kde.org/show_bug.cgi?id=386762
61 ++#if (QT_VERSION < QT_VERSION_CHECK(5, 9, 4))
62 ++ if (wheel->source() != Qt::MouseEventNotSynthesized) {
63 ++#else
64 ++ if (true) {
65 ++#endif
66 ++ if ((wheel->angleDelta().y() != 0) && (wheel->pixelDelta().y() == 0)) {
67 ++ _remainingScrollPixel = 0;
68 ++ } else {
69 ++ _remainingScrollPixel += wheel->pixelDelta().y();
70 ++ }
71 + }
72 + _remainingScrollAngle += wheel->angleDelta().y();
73 + }
74 +--
75 +cgit v0.11.2
76 +
77
78 diff --git a/kde-apps/konsole/konsole-17.12.1-r1.ebuild b/kde-apps/konsole/konsole-17.12.1-r1.ebuild
79 new file mode 100644
80 index 00000000000..8e2357bbc0a
81 --- /dev/null
82 +++ b/kde-apps/konsole/konsole-17.12.1-r1.ebuild
83 @@ -0,0 +1,58 @@
84 +# Copyright 1999-2018 Gentoo Foundation
85 +# Distributed under the terms of the GNU General Public License v2
86 +
87 +EAPI=6
88 +
89 +KDE_HANDBOOK="optional"
90 +KDE_TEST="true"
91 +VIRTUALX_REQUIRED="test"
92 +inherit kde5
93 +
94 +DESCRIPTION="KDE's terminal emulator"
95 +HOMEPAGE="https://www.kde.org/applications/system/konsole https://konsole.kde.org"
96 +
97 +KEYWORDS="~amd64 ~x86"
98 +IUSE="X"
99 +
100 +DEPEND="
101 + $(add_frameworks_dep kbookmarks)
102 + $(add_frameworks_dep kcompletion)
103 + $(add_frameworks_dep kconfig)
104 + $(add_frameworks_dep kconfigwidgets)
105 + $(add_frameworks_dep kcoreaddons)
106 + $(add_frameworks_dep kcrash)
107 + $(add_frameworks_dep kdbusaddons)
108 + $(add_frameworks_dep kguiaddons)
109 + $(add_frameworks_dep kjobwidgets)
110 + $(add_frameworks_dep ki18n)
111 + $(add_frameworks_dep kinit)
112 + $(add_frameworks_dep kiconthemes)
113 + $(add_frameworks_dep kio)
114 + $(add_frameworks_dep knotifications)
115 + $(add_frameworks_dep knotifyconfig)
116 + $(add_frameworks_dep kparts)
117 + $(add_frameworks_dep kpty)
118 + $(add_frameworks_dep kservice)
119 + $(add_frameworks_dep ktextwidgets)
120 + $(add_frameworks_dep kwidgetsaddons)
121 + $(add_frameworks_dep kwindowsystem)
122 + $(add_frameworks_dep kxmlgui)
123 + $(add_qt_dep qtdbus)
124 + $(add_qt_dep qtgui)
125 + $(add_qt_dep qtnetwork)
126 + $(add_qt_dep qtprintsupport)
127 + $(add_qt_dep qtwidgets)
128 + $(add_qt_dep qtxml)
129 + X? ( x11-libs/libX11 )
130 +"
131 +RDEPEND="${DEPEND}"
132 +
133 +PATCHES=( "${FILESDIR}/${P}-libinput-pixeldelta.patch" )
134 +
135 +src_configure() {
136 + local mycmakeargs=(
137 + $(cmake-utils_use_find_package X X11)
138 + )
139 +
140 + kde5_src_configure
141 +}