diff options
author | Gatis Paeglis <gatis.paeglis@qt.io> | 2020-08-19 16:49:53 +0200 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@qt.io> | 2020-08-23 01:18:25 +0200 |
commit | 7318328c2d658f6ca2e9443c6e3e3b0a179e9811 (patch) | |
tree | 964e5286787120ce448fe87c203620c708e8827f /src/gui/kernel | |
parent | 6ece7dd09ac8897b70b062507d2bff69e5e4115a (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().
Pick-to: 5.15
Pick-to: 5.12
Change-Id: Idb23152a24bf3ba3b91804427a6e78f991969c29
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface.cpp | 25 | ||||
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface.h | 1 |
2 files changed, 2 insertions, 24 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp index d812c17c4e..fec0a3deda 100644 --- a/src/gui/kernel/qwindowsysteminterface.cpp +++ b/src/gui/kernel/qwindowsysteminterface.cpp @@ -60,7 +60,6 @@ Q_LOGGING_CATEGORY(lcQpaInputDevices, "qt.qpa.input.devices") QElapsedTimer QWindowSystemInterfacePrivate::eventTime; bool QWindowSystemInterfacePrivate::synchronousWindowSystemEvents = false; -bool QWindowSystemInterfacePrivate::platformFiltersEvents = false; bool QWindowSystemInterfacePrivate::TabletEvent::platformSynthesizesMouse = true; QWaitCondition QWindowSystemInterfacePrivate::eventsFlushed; QMutex QWindowSystemInterfacePrivate::flushEventMutex; @@ -1080,15 +1079,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; @@ -1127,21 +1121,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 fe90934e52..daf1843d39 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 |