diff options
author | Gatis Paeglis <gatis.paeglis@qt.io> | 2020-08-19 16:49:53 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-08-24 09:00:08 +0000 |
commit | f0cf48d81e491ddf4fd6b5fb0ade45b50117b036 (patch) | |
tree | 52c1aefe045d6e180a664587f306a4fbbf74a7f8 | |
parent | 259021703bd845c39e4c132345e7f2a4fd52d12a (diff) |
qwsi: revert parts of 00ae1e6b7bf6efa5f5e57d37844e44d521604fb6
We actually do not need this "mode" in qwsi API. I think while
writing the patch from 00ae1e6b7b I got confused by focusing
on my test application. We can't know what the native event
filter will filter out, therefore it makes sense that we
unconditionally do filtering at qwsi level as well for user input
vs other events in QWindowSystemInterface::sendWindowSystemEvents().
Change-Id: Idb23152a24bf3ba3b91804427a6e78f991969c29
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 7318328c2d658f6ca2e9443c6e3e3b0a179e9811)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface.cpp | 25 | ||||
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface.h | 1 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbintegration.cpp | 2 |
3 files changed, 2 insertions, 26 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp index 8e50e5ef9e..2900cb40ea 100644 --- a/src/gui/kernel/qwindowsysteminterface.cpp +++ b/src/gui/kernel/qwindowsysteminterface.cpp @@ -57,7 +57,6 @@ QT_BEGIN_NAMESPACE QElapsedTimer QWindowSystemInterfacePrivate::eventTime; bool QWindowSystemInterfacePrivate::synchronousWindowSystemEvents = false; -bool QWindowSystemInterfacePrivate::platformFiltersEvents = false; bool QWindowSystemInterfacePrivate::TabletEvent::platformSynthesizesMouse = true; QWaitCondition QWindowSystemInterfacePrivate::eventsFlushed; QMutex QWindowSystemInterfacePrivate::flushEventMutex; @@ -1137,15 +1136,10 @@ bool QWindowSystemInterface::sendWindowSystemEvents(QEventLoop::ProcessEventsFla int nevents = 0; while (QWindowSystemInterfacePrivate::windowSystemEventsQueued()) { - QWindowSystemInterfacePrivate::WindowSystemEvent *event = nullptr; - - if (QWindowSystemInterfacePrivate::platformFiltersEvents) { - event = QWindowSystemInterfacePrivate::getWindowSystemEvent(); - } else { - event = flags & QEventLoop::ExcludeUserInputEvents ? + QWindowSystemInterfacePrivate::WindowSystemEvent *event = + flags & QEventLoop::ExcludeUserInputEvents ? QWindowSystemInterfacePrivate::getNonUserInputWindowSystemEvent() : QWindowSystemInterfacePrivate::getWindowSystemEvent(); - } if (!event) break; @@ -1184,21 +1178,6 @@ bool QWindowSystemInterface::nonUserInputEventsQueued() return QWindowSystemInterfacePrivate::nonUserInputEventsQueued(); } -/*! - Platforms that implement UserInputEvent filtering at native event level must - set this property to \c true. The default is \c false, which means that event - filtering logic is handled by QWindowSystemInterface. Doing the filtering in - platform plugins is necessary when supporting AbstractEventDispatcher::filterNativeEvent(), - which should respect flags that were passed to event dispatcher's processEvents() - call. - - \since 5.12 -*/ -void QWindowSystemInterface::setPlatformFiltersEvents(bool enable) -{ - QWindowSystemInterfacePrivate::platformFiltersEvents = enable; -} - // --------------------- QtTestLib support --------------------- // The following functions are used by testlib, and need to be synchronous to avoid diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h index bf98c33a1a..66af163f05 100644 --- a/src/gui/kernel/qwindowsysteminterface.h +++ b/src/gui/kernel/qwindowsysteminterface.h @@ -296,7 +296,6 @@ public: static void deferredFlushWindowSystemEvents(QEventLoop::ProcessEventsFlags flags); static int windowSystemEventsQueued(); static bool nonUserInputEventsQueued(); - static void setPlatformFiltersEvents(bool enable); }; #ifndef QT_NO_DEBUG_STREAM diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index ed9e87a036..f0ed49ecc0 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -137,8 +137,6 @@ QXcbIntegration::QXcbIntegration(const QStringList ¶meters, int &argc, char m_instance = this; qApp->setAttribute(Qt::AA_CompressHighFrequencyEvents, true); - QWindowSystemInterface::setPlatformFiltersEvents(true); - qRegisterMetaType<QXcbWindow*>(); #if QT_CONFIG(xcb_xlib) XInitThreads(); |