summaryrefslogtreecommitdiffstats
path: root/src/kernel/qapplication.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/qapplication.cpp')
-rw-r--r--src/kernel/qapplication.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp
index 6fade0228..7aefd35b8 100644
--- a/src/kernel/qapplication.cpp
+++ b/src/kernel/qapplication.cpp
@@ -2767,18 +2767,21 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e)
if (!handled) {
#if defined(QT_THREAD_SUPPORT)
- bool locked = false;
+ int locklevel = 0;
+ int llcount;
if (TQApplication::tqt_mutex) {
- locked = TQApplication::tqt_mutex->locked();
- }
- if (locked) {
- TQApplication::tqt_mutex->unlock();
+ TQApplication::tqt_mutex->lock(); // 1 of 2
+ locklevel = tqt_mutex->level() - 1;
+ for (llcount=0; llcount<locklevel; llcount++) {
+ TQApplication::tqt_mutex->unlock();
+ }
+ TQApplication::tqt_mutex->unlock(); // 2 of 2
}
#endif
consumed = receiver->event( e );
#if defined(QT_THREAD_SUPPORT)
- if (locked) {
- if (TQApplication::tqt_mutex) {
+ if (TQApplication::tqt_mutex) {
+ for (llcount=0; llcount<locklevel; llcount++) {
TQApplication::tqt_mutex->lock();
}
}