diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | macosx/tkMacOSXNotify.c | 21 |
2 files changed, 22 insertions, 2 deletions
@@ -4,6 +4,9 @@ 2002-09-09 Jeff Hobbs <jeffh@ActiveState.com> + * macosx/tkMacOSXNotify.c (Tk_MacOSXSetupTkNotifier): corrected + Mac Jaguar event loop issue. + * library/tk.tcl: use command instead of control on Aqua bindings. Force dialogs to appear below fixed native Mac menubar. * macosx/tkMacOSXKeyEvent.c: 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 |