summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXNotify.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-09-10 06:46:52 (GMT)
committerhobbs <hobbs>2002-09-10 06:46:52 (GMT)
commit742855d0d4eca7702b6023aa18ecce61b2bec00a (patch)
tree52e555e41c849793be11fac6965521bbaf94e97a /macosx/tkMacOSXNotify.c
parent19818bb173266c0b02a5132db2f8257598c3e05b (diff)
downloadtk-742855d0d4eca7702b6023aa18ecce61b2bec00a.zip
tk-742855d0d4eca7702b6023aa18ecce61b2bec00a.tar.gz
tk-742855d0d4eca7702b6023aa18ecce61b2bec00a.tar.bz2
* macosx/tkMacOSXNotify.c (Tk_MacOSXSetupTkNotifier): correctedcore_8_4_0
Mac Jaguar event loop issue.
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