diff options
Diffstat (limited to 'src/kernel/qeventloop_x11_glib.cpp')
-rw-r--r-- | src/kernel/qeventloop_x11_glib.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/kernel/qeventloop_x11_glib.cpp b/src/kernel/qeventloop_x11_glib.cpp index 23162c7..2bf1f63 100644 --- a/src/kernel/qeventloop_x11_glib.cpp +++ b/src/kernel/qeventloop_x11_glib.cpp @@ -629,6 +629,10 @@ bool QEventLoop::gsourceDispatch(GSource *gs) { bool QEventLoop::hasPendingEvents() const { +#ifdef QT_THREAD_SUPPORT + QMutexLocker locker( QApplication::qt_mutex ); +#endif // QT_THREAD_SUPPORT + extern uint qGlobalPostedEventsCount(); // from qapplication.cpp return ( qGlobalPostedEventsCount() || ( (qt_is_gui_used && QApplication::isGuiThread()) ? XPending( QPaintDevice::x11AppDisplay() ) : 0)); } |