diff options
author | Gatis Paeglis <gatis.paeglis@qt.io> | 2018-09-07 15:06:27 +0200 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@qt.io> | 2018-10-14 18:40:07 +0000 |
commit | 502a6cc2537f2b26d5cce1caec7504cc89047db1 (patch) | |
tree | cf36e0827f09bda8a488d569bcf080b58de22da5 /src/plugins/platforms/xcb | |
parent | 243c3044b647357ca6df79ac1497ae43de957d31 (diff) |
xcb: localize handling of Qt::AA_Compress* flags
Handle both of them inside the QXcbConnection::compressEvent().
Change-Id: Ibe7184ba5c5b636013145e887c817dca701345ad
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index 4d3f62791c..c1f0b71414 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -1386,6 +1386,9 @@ static inline bool isXIType(xcb_generic_event_t *event, int opCode, uint16_t typ */ bool QXcbConnection::compressEvent(xcb_generic_event_t *event) const { + if (!QCoreApplication::testAttribute(Qt::AA_CompressHighFrequencyEvents)) + return false; + uint responseType = event->response_type & ~0x80; if (responseType == XCB_MOTION_NOTIFY) { @@ -1465,8 +1468,7 @@ void QXcbConnection::processXcbEvents() handleXcbError(reinterpret_cast<xcb_generic_error_t *>(event)); continue; } - if (Q_LIKELY(QCoreApplication::testAttribute(Qt::AA_CompressHighFrequencyEvents)) && - compressEvent(event)) + if (compressEvent(event)) continue; #ifndef QT_NO_CLIPBOARD |