summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWindowEvent.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXWindowEvent.c')
-rw-r--r--macosx/tkMacOSXWindowEvent.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index e2fb633..3719703 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -54,7 +54,7 @@
* software in accordance with the terms specified in this
* license.
*
- * RCS: @(#) $Id: tkMacOSXWindowEvent.c,v 1.12 2006/04/11 07:36:36 das Exp $
+ * RCS: @(#) $Id: tkMacOSXWindowEvent.c,v 1.13 2006/04/11 10:21:28 das Exp $
*/
#include "tkMacOSXInt.h"
@@ -128,28 +128,22 @@ TkMacOSXProcessApplicationEvent(
statusPtr->stopProcessing = 1;
break;
case kEventAppHidden:
- /*
- * Don't bother if we don't have an interp or
- * the show preferences procedure doesn't exist.
- */
- toggleHide = 1;
- if ((eventPtr->interp == NULL) ||
- (Tcl_GetCommandInfo(eventPtr->interp,
- "::tk::mac::OnHide", &dummy)) == 0) {
- break;
+ if (toggleHide == 0) {
+ toggleHide = 1;
+ if (eventPtr->interp && Tcl_GetCommandInfo(eventPtr->interp,
+ "::tk::mac::OnHide", &dummy)) {
+ Tcl_GlobalEval(eventPtr->interp, "::tk::mac::OnHide");
+ }
}
- Tcl_GlobalEval(eventPtr->interp, "::tk::mac::OnHide");
statusPtr->stopProcessing = 1;
break;
case kEventAppShown:
if (toggleHide == 1) {
toggleHide = 0;
- if ((eventPtr->interp == NULL) ||
- (Tcl_GetCommandInfo(eventPtr->interp,
- "::tk::mac::OnShow", &dummy)) == 0) {
- break;
+ if (eventPtr->interp && Tcl_GetCommandInfo(eventPtr->interp,
+ "::tk::mac::OnShow", &dummy)) {
+ Tcl_GlobalEval(eventPtr->interp, "::tk::mac::OnShow");
}
- Tcl_GlobalEval(eventPtr->interp, "::tk::mac::OnShow");
}
statusPtr->stopProcessing = 1;
break;