diff options
Diffstat (limited to 'macosx/tkMacOSXWindowEvent.c')
-rw-r--r-- | macosx/tkMacOSXWindowEvent.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index 0f1e2be..e1a0f6f 100644 --- a/macosx/tkMacOSXWindowEvent.c +++ b/macosx/tkMacOSXWindowEvent.c @@ -15,7 +15,7 @@ #include "tkMacOSXWm.h" #include "tkMacOSXEvent.h" #include "tkMacOSXDebug.h" - + /* #ifdef TK_MAC_DEBUG #define TK_MAC_DEBUG_EVENTS @@ -272,13 +272,12 @@ extern NSString *opaqueTag; const char *cmd = ([[notification name] isEqualToString: NSApplicationDidUnhideNotification] ? "::tk::mac::OnShow" : "::tk::mac::OnHide"); - Tcl_CmdInfo dummy; - if (_eventInterp && Tcl_GetCommandInfo(_eventInterp, cmd, &dummy)) { + if (_eventInterp && Tcl_FindCommand(_eventInterp, cmd, NULL, 0)) { int code = Tcl_EvalEx(_eventInterp, cmd, -1, TCL_EVAL_GLOBAL); if (code != TCL_OK) { - Tcl_BackgroundError(_eventInterp); + Tcl_BackgroundException(_eventInterp, code); } Tcl_ResetResult(_eventInterp); } @@ -395,7 +394,7 @@ GenerateUpdates( /* * TODO: Here we should handle out of process embedding. */ - } + } return 1; } @@ -710,11 +709,10 @@ TkWmProtocolEventProc( Tcl_Preserve(interp); result = Tcl_EvalEx(interp, protPtr->command, -1, TCL_EVAL_GLOBAL); if (result != TCL_OK) { - Tcl_AddErrorInfo(interp, "\n (command for \""); - Tcl_AddErrorInfo(interp, - Tk_GetAtomName((Tk_Window) winPtr, protocol)); - Tcl_AddErrorInfo(interp, "\" window manager protocol)"); - Tcl_BackgroundError(interp); + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (command for \"%s\" window manager protocol)", + Tk_GetAtomName((Tk_Window) winPtr, protocol))); + Tcl_BackgroundException(interp, result); } Tcl_Release(interp); Tcl_Release(protPtr); @@ -819,7 +817,7 @@ ExposeRestrictProc( NSCompositeSourceOver); #endif - + CGFloat height = [self bounds].size.height; HIMutableShapeRef drawShape = HIShapeCreateMutable(); @@ -837,9 +835,9 @@ ExposeRestrictProc( NSEventTrackingRunLoopMode, NSModalPanelRunLoopMode, nil]]; } - + CFRelease(drawShape); - + } @@ -851,7 +849,6 @@ ExposeRestrictProc( [super viewWillDraw]; } - - (BOOL) preservesContentDuringLiveResize { return YES; @@ -874,7 +871,7 @@ ExposeRestrictProc( [self setNeedsDisplay:YES]; [super setNeedsDisplay:YES]; [super viewDidEndLiveResize]; - + } /*Core function of this class, generates expose events for redrawing.*/ |