summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWindowEvent.c
diff options
context:
space:
mode:
authordas <das>2006-04-11 10:21:53 (GMT)
committerdas <das>2006-04-11 10:21:53 (GMT)
commitf5a84a3ca38863707636ae0d1d0cd1df40142ad2 (patch)
tree0cf09658c40fad8e63cb2e2076ecaff441360da8 /macosx/tkMacOSXWindowEvent.c
parente976b2767a0b00ee61b26d7d65eb37b38c4d4623 (diff)
downloadtk-f5a84a3ca38863707636ae0d1d0cd1df40142ad2.zip
tk-f5a84a3ca38863707636ae0d1d0cd1df40142ad2.tar.gz
tk-f5a84a3ca38863707636ae0d1d0cd1df40142ad2.tar.bz2
* macosx/tkMacOSXHLEvents.c: call ::tk::mac::* procs for all
* macosx/tkMacOSXWindowEvent.c: registered appleevents [FR 1105284], implement print applevent handling, style/whitespace cleanup.
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 42f1041..d34bcf1 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.3.2.10 2006/04/11 07:36:40 das Exp $
+ * RCS: @(#) $Id: tkMacOSXWindowEvent.c,v 1.3.2.11 2006/04/11 10:21:53 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;