summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'kde-apps')
-rw-r--r--kde-apps/konsole/files/konsole-17.12.1-libinput-pixeldelta.patch54
-rw-r--r--kde-apps/konsole/konsole-17.12.1-r1.ebuild58
2 files changed, 112 insertions, 0 deletions
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
new file mode 100644
index 000000000000..37049b9b2f2a
--- /dev/null
+++ b/kde-apps/konsole/files/konsole-17.12.1-libinput-pixeldelta.patch
@@ -0,0 +1,54 @@
+From d25e5ac7089f2c81cc5ffe8e155ba8b3dfb11b97 Mon Sep 17 00:00:00 2001
+From: Kurt Hindenburg <kurt.hindenburg@gmail.com>
+Date: Wed, 7 Feb 2018 10:38:09 -0500
+Subject: Fix mouse wheel scrolling with libinput
+
+If the Libinput X server input driver is used we get a value for
+pixelDelta for a physical mouse wheel scroll, so we check that the
+source of the wheel event is actually a mouse, this was fixed in
+Qt 5.9.5*
+https://bugreports.qt.io/browse/QTBUG-59261
+
+Patch by ahmadsamir
+
+* fixed in Gentoo: Qt 5.9.4
+
+BUG: 386762
+Differential Revision: https://phabricator.kde.org/D9008
+---
+ src/ScrollState.cpp | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/ScrollState.cpp b/src/ScrollState.cpp
+index e5b486d..f71b142 100644
+--- a/src/ScrollState.cpp
++++ b/src/ScrollState.cpp
+@@ -25,10 +25,21 @@ using namespace Konsole;
+
+ void ScrollState::addWheelEvent(const QWheelEvent *wheel)
+ {
+- if ((wheel->angleDelta().y() != 0) && (wheel->pixelDelta().y() == 0)) {
+- _remainingScrollPixel = 0;
+- } else {
+- _remainingScrollPixel += wheel->pixelDelta().y();
++ // If the Libinput X server input driver is used we get a value for
++ // pixelDelta for a physical mouse wheel scroll, so we check that
++ // the source of the wheel event is actually a mouse, this has been
++ // fixed upstream in Qt 5.9.5: https://bugreports.qt.io/browse/QTBUG-59261
++ // Fixes Konsole BUG: https://bugs.kde.org/show_bug.cgi?id=386762
++#if (QT_VERSION < QT_VERSION_CHECK(5, 9, 4))
++ if (wheel->source() != Qt::MouseEventNotSynthesized) {
++#else
++ if (true) {
++#endif
++ if ((wheel->angleDelta().y() != 0) && (wheel->pixelDelta().y() == 0)) {
++ _remainingScrollPixel = 0;
++ } else {
++ _remainingScrollPixel += wheel->pixelDelta().y();
++ }
+ }
+ _remainingScrollAngle += wheel->angleDelta().y();
+ }
+--
+cgit v0.11.2
+
diff --git a/kde-apps/konsole/konsole-17.12.1-r1.ebuild b/kde-apps/konsole/konsole-17.12.1-r1.ebuild
new file mode 100644
index 000000000000..8e2357bbc0a9
--- /dev/null
+++ b/kde-apps/konsole/konsole-17.12.1-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+KDE_HANDBOOK="optional"
+KDE_TEST="true"
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+DESCRIPTION="KDE's terminal emulator"
+HOMEPAGE="https://www.kde.org/applications/system/konsole https://konsole.kde.org"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="X"
+
+DEPEND="
+ $(add_frameworks_dep kbookmarks)
+ $(add_frameworks_dep kcompletion)
+ $(add_frameworks_dep kconfig)
+ $(add_frameworks_dep kconfigwidgets)
+ $(add_frameworks_dep kcoreaddons)
+ $(add_frameworks_dep kcrash)
+ $(add_frameworks_dep kdbusaddons)
+ $(add_frameworks_dep kguiaddons)
+ $(add_frameworks_dep kjobwidgets)
+ $(add_frameworks_dep ki18n)
+ $(add_frameworks_dep kinit)
+ $(add_frameworks_dep kiconthemes)
+ $(add_frameworks_dep kio)
+ $(add_frameworks_dep knotifications)
+ $(add_frameworks_dep knotifyconfig)
+ $(add_frameworks_dep kparts)
+ $(add_frameworks_dep kpty)
+ $(add_frameworks_dep kservice)
+ $(add_frameworks_dep ktextwidgets)
+ $(add_frameworks_dep kwidgetsaddons)
+ $(add_frameworks_dep kwindowsystem)
+ $(add_frameworks_dep kxmlgui)
+ $(add_qt_dep qtdbus)
+ $(add_qt_dep qtgui)
+ $(add_qt_dep qtnetwork)
+ $(add_qt_dep qtprintsupport)
+ $(add_qt_dep qtwidgets)
+ $(add_qt_dep qtxml)
+ X? ( x11-libs/libX11 )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-libinput-pixeldelta.patch" )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_find_package X X11)
+ )
+
+ kde5_src_configure
+}