summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection.cpp
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@qt.io>2017-04-24 14:14:58 -0700
committerGabriel de Dietrich <gabriel.dedietrich@qt.io>2017-05-01 04:41:27 +0000
commit06713ded600d2d1fb5469dc31373a1878c366485 (patch)
tree1bda9f71f3442e31aadbf5bd15d4cff927f42ea5 /src/plugins/platforms/xcb/qxcbconnection.cpp
parent5398aaabfc968c198137aa9b28187d9d2a57aa40 (diff)
Introducing AA_CompressTabletEvents
Tablet events compression has been missing since commit 60cd1c67759642018ef93cc45a90714729100d9d in 5.6.1, and there's no way to bring the old behavior back. Since tablet events are not taken into account by AA_CompressHighFrequencyEvents on purpose, we introduce this new flag. This new flag is conditional to AA_CompressHighFrequencyEvents being set in order for it to be effective. [ChangeLog][QtCore][Tablet support] If the application attribute AA_CompressTabletEvents is set in addition to AA_CompressHighFrequencyEvents, even the QTabletEvents will be compressed (only on the X11 platform so far). AA_CompressHighFrequencyEvents does not enable compression of tablet events by itself, because paint applications typically need to process all possible tablet events in order to draw the smoothest curves. Change-Id: Ie7434ab4f9a4c64f2626c75e661cfd0d6cd22896 Task-number: QTBUG-44964 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Wayne Arnold <wayne.arnold@autodesk.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 58799793ae..66fa59bfea 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -1562,7 +1562,8 @@ bool QXcbConnection::compressEvent(xcb_generic_event_t *event, int currentIndex,
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))
+ if (!QCoreApplication::testAttribute(Qt::AA_CompressTabletEvents) &&
+ const_cast<QXcbConnection *>(this)->tabletDataForDevice(xdev->sourceid))
return false;
#endif // QT_NO_TABLETEVENT
for (int j = nextIndex; j < eventqueue->size(); ++j) {