diff options
author | Shawn Rutledge <shawn.rutledge@theqtcompany.com> | 2016-04-22 15:30:26 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@theqtcompany.com> | 2016-05-15 08:05:29 +0000 |
commit | 28fab275033a6b4f8d6e78da0f729837144b0420 (patch) | |
tree | f85e7c891df3b5518c2f58d4573e8a55215c5e50 /src/plugins/platforms/xcb | |
parent | dc40abe925db4a6d4f4236f61bb0c55b585c75da (diff) |
add AA_CompressHighFrequencyEvents to control compression on xcb
7edd10e6c added this compression feature, but some applications may
need to disable it.
[ChangeLog][X11] It's now possible to unset AA_CompressHighFrequencyEvents
to disable the new X event compression feature that was added in 5.6.0.
This is a replacement for the WA_NoX11EventCompression flag in Qt 4.
Task-number: QTBUG-44964
Change-Id: I37a9c8a4831f1c02eda0f03b54125f3255d25500
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.cpp | 3 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbintegration.cpp | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index 87b4c7b91f..4b0e94eda0 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -1713,7 +1713,8 @@ void QXcbConnection::processXcbEvents() continue; } - if (compressEvent(event, i, eventqueue)) + if (Q_LIKELY(QCoreApplication::testAttribute(Qt::AA_CompressHighFrequencyEvents)) && + compressEvent(event, i, eventqueue)) continue; bool accepted = false; diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index 703167c0cd..cdbf9b295e 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -125,6 +125,7 @@ QXcbIntegration::QXcbIntegration(const QStringList ¶meters, int &argc, char , m_defaultVisualId(UINT_MAX) { m_instance = this; + qApp->setAttribute(Qt::AA_CompressHighFrequencyEvents, true); qRegisterMetaType<QXcbWindow*>(); #ifdef XCB_USE_XLIB |