[arch-commits] Commit in qt5-base/trunk (PKGBUILD qtbug-44964.patch)

Antonio Rojas arojas at archlinux.org
Tue May 31 10:44:25 UTC 2016


    Date: Tuesday, May 31, 2016 @ 12:44:24
  Author: arojas
Revision: 268772

Backport a fix required by krita 3.0

Added:
  qt5-base/trunk/qtbug-44964.patch
Modified:
  qt5-base/trunk/PKGBUILD

-------------------+
 PKGBUILD          |   12 +++---
 qtbug-44964.patch |  100 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 106 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-05-31 09:54:03 UTC (rev 268771)
+++ PKGBUILD	2016-05-31 10:44:24 UTC (rev 268772)
@@ -5,7 +5,7 @@
 pkgname=qt5-base
 _qtver=5.6.0
 pkgver=${_qtver/-/}
-pkgrel=6
+pkgrel=7
 arch=('i686' 'x86_64')
 url='http://qt-project.org/'
 license=('GPL3' 'LGPL' 'FDL' 'custom')
@@ -27,7 +27,7 @@
 groups=('qt' 'qt5')
 _pkgfqn="${pkgname/5-/}-opensource-src-${_qtver}"
 source=("http://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz" qt5-alsa1.11.patch
-        qtbug-51648.patch qtbug-51649.patch qtbug-51676.patch qtbug-45812.patch
+        qtbug-51648.patch qtbug-51649.patch qtbug-51676.patch qtbug-45812.patch qtbug-44964.patch
         qtbug-53071.patch::"https://github.com/qtproject/qtbase/commit/e9041c7fc.patch"
         qtbug-53071b.patch::"https://github.com/qtproject/qtbase/commit/cd25866f.patch")
 md5sums=('d6b6cfd333c22829c6c85fc52ceed019'
@@ -36,6 +36,7 @@
          'ef981ff6892337cdab424ebb113b3c39'
          'f59a1ea0f10a055ba930a53832933482'
          '7f152c40947027acba56023e9d693260'
+         '28cddedf6c15751d08c1382bf1074fa7'
          '462f079cd46f869def6858903a718bf5'
          'da4fd787ea877516397a027412e975e1')
 
@@ -70,15 +71,14 @@
   # Fix parsing of tzfile(5) POSIX rule zone names with bracket quotes
   patch -p1 -i ../qtbug-53071.patch
   patch -p1 -i ../qtbug-53071b.patch
+
+  # Don't compress tablet motion events
+  patch -p1 -i ../qtbug-44964.patch
 }
 
 build() {
   cd ${_pkgfqn}
 
-#  export QTDIR="${srcdir}"/${_pkgfqn}
-#  export LD_LIBRARY_PATH="${QTDIR}"/lib:"${LD_LIBRARY_PATH}"
-#  export QT_PLUGIN_PATH="${QTDIR}"/qtbase/plugins
-
   # FS#38796
   [[ "${CARCH}" = "i686" ]] && SSE2="-no-sse2"
 

Added: qtbug-44964.patch
===================================================================
--- qtbug-44964.patch	                        (rev 0)
+++ qtbug-44964.patch	2016-05-31 10:44:24 UTC (rev 268772)
@@ -0,0 +1,100 @@
+From 60cd1c67759642018ef93cc45a90714729100d9d Mon Sep 17 00:00:00 2001
+From: Shawn Rutledge <shawn.rutledge at theqtcompany.com>
+Date: Thu, 28 Apr 2016 11:30:30 +0200
+Subject: [PATCH] xcb: don't compress tablet motion events
+
+7edd10e6c added this compression feature, but it's not a good idea for
+drawing-tablet applications, because smooth drawing depends on receiving
+every movement of the stylus.
+
+Also show the device ID in qt.qpa.input.devices category logging.
+
+[ChangeLog][X11] The new X event compression feature that was added in
+5.6.0 no longer applies to motion events from drawing tablets.
+
+Task-number: QTBUG-44964
+Change-Id: Icd2ca8ca77d8f80c2f39160c74208db10e382501
+Reviewed-by: Gatis Paeglis <gatis.paeglis at theqtcompany.com>
+---
+ src/plugins/platforms/xcb/qxcbconnection.cpp     |  7 ++++++-
+ src/plugins/platforms/xcb/qxcbconnection.h       |  1 +
+ src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 21 ++++++++++++++-------
+ 3 files changed, 21 insertions(+), 8 deletions(-)
+
+diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
+index edfaf2b..669ef3a 100644
+--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
++++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
+@@ -1626,8 +1626,13 @@ bool QXcbConnection::compressEvent(xcb_generic_event_t *event, int currentIndex,
+         if (!m_xi2Enabled)
+             return false;
+ 
+-        // compress XI_Motion
++        // compress XI_Motion, but not from tablet devices
+         if (isXIType(event, m_xiOpCode, XI_Motion)) {
++#ifndef QT_NO_TABLETEVENT
++            xXIDeviceEvent *xdev = reinterpret_cast<xXIDeviceEvent *>(event);
++            if (const_cast<QXcbConnection *>(this)->tabletDataForDevice(xdev->sourceid))
++                return false;
++#endif // QT_NO_TABLETEVENT
+             for (int j = nextIndex; j < eventqueue->size(); ++j) {
+                 xcb_generic_event_t *next = eventqueue->at(j);
+                 if (!isValid(next))
+diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
+index 7ba9588..501da1c 100644
+--- a/src/plugins/platforms/xcb/qxcbconnection.h
++++ b/src/plugins/platforms/xcb/qxcbconnection.h
+@@ -578,6 +578,7 @@ private slots:
+     bool xi2HandleTabletEvent(void *event, TabletData *tabletData, QXcbWindowEventListener *eventListener);
+     void xi2ReportTabletEvent(TabletData &tabletData, void *event);
+     QVector<TabletData> m_tabletData;
++    TabletData *tabletDataForDevice(int id);
+ #endif // !QT_NO_TABLETEVENT
+     struct ScrollingDevice {
+         ScrollingDevice() : deviceId(0), verticalIndex(0), horizontalIndex(0), orientations(0), legacyOrientations(0) { }
+diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
+index 9911afb..025dde3 100644
+--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
++++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
+@@ -113,7 +113,7 @@ void QXcbConnection::xi2SetupDevices()
+         // Only non-master pointing devices are relevant here.
+         if (devices[i].use != XISlavePointer)
+             continue;
+-        qCDebug(lcQpaXInputDevices) << "input device "<< devices[i].name;
++        qCDebug(lcQpaXInputDevices) << "input device " << devices[i].name << "ID" << devices[i].deviceid;
+ #ifndef QT_NO_TABLETEVENT
+         TabletData tabletData;
+ #endif
+@@ -507,12 +507,9 @@ void QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event)
+     }
+ 
+ #ifndef QT_NO_TABLETEVENT
+-    for (int i = 0; i < m_tabletData.count(); ++i) {
+-        if (m_tabletData.at(i).deviceId == sourceDeviceId) {
+-            if (xi2HandleTabletEvent(xiEvent, &m_tabletData[i], eventListener))
+-                return;
+-        }
+-    }
++    QXcbConnection::TabletData *tablet = tabletDataForDevice(sourceDeviceId);
++    if (tablet && xi2HandleTabletEvent(xiEvent, tablet, eventListener))
++        return;
+ #endif // QT_NO_TABLETEVENT
+ 
+ #ifdef XCB_USE_XINPUT21
+@@ -1198,6 +1195,16 @@ void QXcbConnection::xi2ReportTabletEvent(TabletData &tabletData, void *event)
+                                               xTilt, yTilt, tangentialPressure,
+                                               rotation, 0, tabletData.serialId);
+ }
++
++QXcbConnection::TabletData *QXcbConnection::tabletDataForDevice(int id)
++{
++    for (int i = 0; i < m_tabletData.count(); ++i) {
++        if (m_tabletData.at(i).deviceId == id)
++            return &m_tabletData[i];
++    }
++    return Q_NULLPTR;
++}
++
+ #endif // QT_NO_TABLETEVENT
+ 
+ #endif // XCB_USE_XINPUT2



More information about the arch-commits mailing list