public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/kde:master commit in: kde-apps/konsole/files/, kde-apps/konsole/
Date: Thu,  8 Feb 2018 00:14:21 +0000 (UTC)	[thread overview]
Message-ID: <1518048847.140d0b7b372c6c9060be89e07959aa017869f7c7.asturm@gentoo> (raw)

commit:     140d0b7b372c6c9060be89e07959aa017869f7c7
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  7 16:02:45 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Feb  8 00:14:07 2018 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=140d0b7b

kde-apps/konsole: Fix mouse wheel scrolling w/ libinput

KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=386762
Package-Manager: Portage-2.3.24, Repoman-2.3.6

 .../konsole-17.12.1-libinput-pixeldelta.patch      | 54 ++++++++++++++++++++++
 kde-apps/konsole/konsole-17.12.2.ebuild            |  2 +
 kde-apps/konsole/konsole-17.12.49.9999.ebuild      |  2 +
 3 files changed, 58 insertions(+)

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 0000000000..37049b9b2f
--- /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.2.ebuild b/kde-apps/konsole/konsole-17.12.2.ebuild
index c091c44e38..13661d1d26 100644
--- a/kde-apps/konsole/konsole-17.12.2.ebuild
+++ b/kde-apps/konsole/konsole-17.12.2.ebuild
@@ -47,6 +47,8 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
+PATCHES=( "${FILESDIR}/${PN}-17.12.1-libinput-pixeldelta.patch" )
+
 src_configure() {
 	local mycmakeargs=(
 		$(cmake-utils_use_find_package X X11)

diff --git a/kde-apps/konsole/konsole-17.12.49.9999.ebuild b/kde-apps/konsole/konsole-17.12.49.9999.ebuild
index da3754de86..91bdb3a97d 100644
--- a/kde-apps/konsole/konsole-17.12.49.9999.ebuild
+++ b/kde-apps/konsole/konsole-17.12.49.9999.ebuild
@@ -47,6 +47,8 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
+PATCHES=( "${FILESDIR}/${PN}-17.12.1-libinput-pixeldelta.patch" )
+
 src_configure() {
 	local mycmakeargs=(
 		$(cmake-utils_use_find_package X X11)


             reply	other threads:[~2018-02-08  0:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-08  0:14 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-07-12 17:24 [gentoo-commits] proj/kde:master commit in: kde-apps/konsole/files/, kde-apps/konsole/ Andreas Sturmlechner
2023-09-15 16:46 Andreas Sturmlechner
2022-07-31 15:12 Andreas Sturmlechner
2019-03-06 14:35 Andreas Sturmlechner
2015-01-19 21:56 Johannes Huber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1518048847.140d0b7b372c6c9060be89e07959aa017869f7c7.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox