summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp')
-rw-r--r--src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp b/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp
index dc4785071f..0ccbf01e80 100644
--- a/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp
+++ b/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp
@@ -52,17 +52,14 @@ struct GUserEventSource
{
GSource source;
QPAEventDispatcherGlib *q;
+ QPAEventDispatcherGlibPrivate *d;
};
static gboolean userEventSourcePrepare(GSource *source, gint *timeout)
{
Q_UNUSED(timeout)
GUserEventSource *userEventSource = reinterpret_cast<GUserEventSource *>(source);
- QPAEventDispatcherGlib *dispatcher = userEventSource->q;
- if (dispatcher->m_flags & QEventLoop::ExcludeUserInputEvents)
- return QWindowSystemInterface::nonUserInputEventsQueued();
- else
- return QWindowSystemInterface::windowSystemEventsQueued() > 0;
+ return userEventSource->d->wakeUpCalled;
}
static gboolean userEventSourceCheck(GSource *source)
@@ -94,6 +91,7 @@ QPAEventDispatcherGlibPrivate::QPAEventDispatcherGlibPrivate(GMainContext *conte
userEventSource = reinterpret_cast<GUserEventSource *>(g_source_new(&userEventSourceFuncs,
sizeof(GUserEventSource)));
userEventSource->q = q;
+ userEventSource->d = this;
g_source_set_can_recurse(&userEventSource->source, true);
g_source_attach(&userEventSource->source, mainContext);
}