diff options
Diffstat (limited to 'src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp')
-rw-r--r-- | src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp b/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp index 4c8a82470b..dc4785071f 100644 --- a/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp +++ b/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp @@ -46,8 +46,6 @@ #include <glib.h> #include "private/qguiapplication_p.h" -#include <qdebug.h> - QT_BEGIN_NAMESPACE struct GUserEventSource @@ -56,12 +54,15 @@ struct GUserEventSource QPAEventDispatcherGlib *q; }; -static gboolean userEventSourcePrepare(GSource *s, gint *timeout) +static gboolean userEventSourcePrepare(GSource *source, gint *timeout) { - Q_UNUSED(s) Q_UNUSED(timeout) - - return QWindowSystemInterface::windowSystemEventsQueued() > 0; + GUserEventSource *userEventSource = reinterpret_cast<GUserEventSource *>(source); + QPAEventDispatcherGlib *dispatcher = userEventSource->q; + if (dispatcher->m_flags & QEventLoop::ExcludeUserInputEvents) + return QWindowSystemInterface::nonUserInputEventsQueued(); + else + return QWindowSystemInterface::windowSystemEventsQueued() > 0; } static gboolean userEventSourceCheck(GSource *source) |