summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXNotify.c
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2002-09-10 06:46:51 (GMT)
committerhobbs <hobbs@noemail.net>2002-09-10 06:46:51 (GMT)
commit5ae775621cdfa3646e191d1ee6a9cc359fa4743b (patch)
tree52e555e41c849793be11fac6965521bbaf94e97a /macosx/tkMacOSXNotify.c
parent9c063ab7fc42d92f3effc938dd5845c866c6bb74 (diff)
downloadtk-5ae775621cdfa3646e191d1ee6a9cc359fa4743b.zip
tk-5ae775621cdfa3646e191d1ee6a9cc359fa4743b.tar.gz
tk-5ae775621cdfa3646e191d1ee6a9cc359fa4743b.tar.bz2
* macosx/tkMacOSXNotify.c (Tk_MacOSXSetupTkNotifier): correctedcore-8-4-0
Mac Jaguar event loop issue. FossilOrigin-Name: 21653817c0702bacf9d8456fad19f55963f6c1e9
Diffstat (limited to 'macosx/tkMacOSXNotify.c')
-rw-r--r--macosx/tkMacOSXNotify.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c
index c8c5af9..78b3445 100644
--- a/macosx/tkMacOSXNotify.c
+++ b/macosx/tkMacOSXNotify.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXNotify.c,v 1.2 2002/08/31 06:12:30 das Exp $
+ * RCS: @(#) $Id: tkMacOSXNotify.c,v 1.3 2002/09/10 06:46:52 hobbs Exp $
*/
#include "tclInt.h"
@@ -216,6 +216,7 @@ EventRef TkMacOSXCreateFakeEvent ();
void
Tk_MacOSXSetupTkNotifier()
{
+ EventQueueRef mainEventQueue;
Tcl_NotifierProcs macNotifierProcs = {
TkMacOSXSetTimer,
TkMacOSXWaitForEvent,
@@ -226,9 +227,25 @@ Tk_MacOSXSetupTkNotifier()
TkMacOSXAlertNotifier,
TkMacOSXServiceModeHook
};
-
+
+ /*
+ * Dispose of existing unix notifier thread
+ */
+
+ TclFinalizeNotifier();
+
Tcl_SetNotifier(&macNotifierProcs);
+ /* HACK ALERT: There is a bug in Jaguar where when it goes to make
+ * the event queue for the Main Event Loop, it stores the Current
+ * event loop rather than the Main Event Loop in the Queue structure.
+ * So we have to make sure that the Main Event Queue gets set up on
+ * the main thread. Calling GetMainEventQueue will force this to
+ * happen.
+ */
+
+ mainEventQueue = GetMainEventQueue();
+
/*
* Tcl_SetNotifier doesn't call the TclInitNotifier
* so we call it now. If we don't do this the