summaryrefslogtreecommitdiffstats
path: root/src/kernel/tqeventloop_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/tqeventloop_x11.cpp')
-rw-r--r--src/kernel/tqeventloop_x11.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/kernel/tqeventloop_x11.cpp b/src/kernel/tqeventloop_x11.cpp
index 8a2edf804..09fc42e82 100644
--- a/src/kernel/tqeventloop_x11.cpp
+++ b/src/kernel/tqeventloop_x11.cpp
@@ -231,8 +231,11 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags )
}
}
+ // Include or exclude SocketNotifiers (by setting or cleaning poll events)
+ // Socket notifier events are only activated in the core application event loop,
+ // so filter them out in other event loops.
int highest = 0;
- if ( ! ( flags & ExcludeSocketNotifiers ) ) {
+ if (!(flags & ExcludeSocketNotifiers) && TQApplication::isGuiThread()) {
// return the highest fd we can wait for input on
if ( d->sn_highest >= 0 ) { // has socket notifier(s)
if ( d->sn_vec[0].list && ! d->sn_vec[0].list->isEmpty() )
@@ -370,7 +373,8 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags )
}
// activate socket notifiers
- if ( ! ( flags & ExcludeSocketNotifiers ) && nsel > 0 && d->sn_highest >= 0 ) {
+ if (!(flags & ExcludeSocketNotifiers) && nsel > 0 && d->sn_highest >= 0 &&
+ TQApplication::isGuiThread()) {
// if select says data is ready on any socket, then set the socket notifier
// to pending
int i;