diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-03-09 14:35:11 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-10 22:16:05 +0100 |
commit | 472cc7ac27ea552a254b9a56663a8e94082b137a (patch) | |
tree | 99e6e629dc22c75ec6bba3bdd2b0be463e699134 /src/plugins/platforms/xcb/qxcbnativeinterface.cpp | |
parent | d8e6350c16a1cf696cf65d9cc898c7bd34419ec7 (diff) |
XCB: Implement native events for for windows.
Change-Id: Iacea1231b49ebe57da96f4012d3f314e1b037105
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbnativeinterface.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbnativeinterface.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp index f56072f9d7..fc320ee69c 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp @@ -76,7 +76,9 @@ public: Q_GLOBAL_STATIC(QXcbResourceMap, qXcbResourceMap) -QXcbNativeInterface::QXcbNativeInterface() +QXcbNativeInterface::QXcbNativeInterface() : + m_genericEventFilterType(QByteArrayLiteral("xcb_generic_event_t")) + { qFill(m_eventFilters, m_eventFilters + EventFilterCount, EventFilter(0)); } @@ -134,7 +136,7 @@ void *QXcbNativeInterface::nativeResourceForWindow(const QByteArray &resourceStr QPlatformNativeInterface::EventFilter QXcbNativeInterface::setEventFilter(const QByteArray &eventType, QPlatformNativeInterface::EventFilter filter) { int type = -1; - if (eventType == QByteArrayLiteral("xcb_generic_event_t")) + if (eventType == m_genericEventFilterType) type = GenericEventFilter; if (type == -1) { qWarning("QXcbNativeInterface: %s: Attempt to set invalid event filter type '%s'.", |