summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWindowEvent.c
diff options
context:
space:
mode:
authordas <das>2006-04-11 10:21:28 (GMT)
committerdas <das>2006-04-11 10:21:28 (GMT)
commit93e85c8f5894a94877c2a496e6bf0dbc80d721db (patch)
tree94a447c670dfaa1330bd1f014d3b44b95278031e /macosx/tkMacOSXWindowEvent.c
parent7efb0d59de51c49e43bb085844fc8a1070db1c93 (diff)
downloadtk-93e85c8f5894a94877c2a496e6bf0dbc80d721db.zip
tk-93e85c8f5894a94877c2a496e6bf0dbc80d721db.tar.gz
tk-93e85c8f5894a94877c2a496e6bf0dbc80d721db.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 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;