summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macosx/tkMacOSXColor.c6
-rw-r--r--macosx/tkMacOSXDraw.c2
-rw-r--r--macosx/tkMacOSXHLEvents.c4
-rw-r--r--macosx/tkMacOSXScrlbr.c6
-rw-r--r--macosx/tkMacOSXSubwindows.c4
-rw-r--r--macosx/tkMacOSXWindowEvent.c5
6 files changed, 15 insertions, 12 deletions
diff --git a/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c
index 1b80632..14ab90b 100644
--- a/macosx/tkMacOSXColor.c
+++ b/macosx/tkMacOSXColor.c
@@ -411,7 +411,7 @@ TkMacOSXInDarkMode(Tk_Window tkwin)
NSAppearanceName name;
NSView *view = nil;
if (winPtr && winPtr->privatePtr) {
- view = TkMacOSXDrawableView((MacDrawable *)(winPtr->privatePtr));
+ view = TkMacOSXDrawableView((Drawable)winPtr->privatePtr);
}
if (view) {
name = [[view effectiveAppearance] name];
@@ -708,8 +708,8 @@ TkpGetColor(
}
if (tkwin) {
display = Tk_Display(tkwin);
- MacDrawable *macWin = (MacDrawable *) Tk_WindowId(tkwin);
- view = TkMacOSXDrawableView(macWin);
+ Drawable d = (Drawable)Tk_WindowId(tkwin);
+ view = TkMacOSXDrawableView(d);
}
/*
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index a859b61..a12e9dc 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -1248,7 +1248,7 @@ TkMacOSXSetupDrawingContext(
*/
if (!(macDraw->flags & TK_IS_PIXMAP)) {
- view = TkMacOSXDrawableView(macDraw);
+ view = TkMacOSXDrawableView(d);
if (!view) {
Tcl_Panic("TkMacOSXSetupDrawingContext(): "
"no NSView to draw into !");
diff --git a/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c
index b0656f7..a25c5d0 100644
--- a/macosx/tkMacOSXHLEvents.c
+++ b/macosx/tkMacOSXHLEvents.c
@@ -402,6 +402,7 @@ static void ProcessAppleEvent(
}
code = Tcl_EvalEx(AEInfo->interp, Tcl_DStringValue(&AEInfo->command),
Tcl_DStringLength(&AEInfo->command), TCL_EVAL_GLOBAL);
+
if (AEInfo->replyEvent && code >= 0) {
int reslen;
const char *result = Tcl_GetStringFromObj(Tcl_GetObjResult(AEInfo->interp),
@@ -415,9 +416,10 @@ static void ProcessAppleEvent(
AEPutParamPtr((AppleEvent*)[AEInfo->replyEvent aeDesc],
keyErrorNumber, typeSInt32, (Ptr) &code, sizeof(int));
}
- } else if (code != TCL_OK) {
+ } else if (code != TCL_OK) {
Tcl_BackgroundException(AEInfo->interp, code);
}
+
Tcl_DStringFree(&AEInfo->command);
ckfree(clientData);
}
diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c
index 06e0402..8338f0e 100644
--- a/macosx/tkMacOSXScrlbr.c
+++ b/macosx/tkMacOSXScrlbr.c
@@ -174,8 +174,8 @@ static void drawMacScrollbar(
MacScrollbar *msPtr,
CGContextRef context)
{
- MacDrawable *macWin = (MacDrawable *) Tk_WindowId(scrollPtr->tkwin);
- NSView *view = TkMacOSXDrawableView(macWin);
+ Drawable d = (Drawable)Tk_WindowId(scrollPtr->tkwin);
+ NSView *view = TkMacOSXDrawableView(d);
CGPathRef path;
CGPoint inner[2], outer[2], thumbOrigin;
CGSize thumbSize;
@@ -263,7 +263,7 @@ TkpDisplayScrollbar(
if ((view == NULL)
|| (macWin->flags & TK_DO_NOT_DRAW)
- || !TkMacOSXSetupDrawingContext((Drawable) macWin, NULL, &dc)) {
+ || !TkMacOSXSetupDrawingContext((Drawable)macWin, NULL, &dc)) {
return;
}
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index 18a21a6..b2456f3 100644
--- a/macosx/tkMacOSXSubwindows.c
+++ b/macosx/tkMacOSXSubwindows.c
@@ -515,7 +515,7 @@ MoveResizeWindow(
{
int deltaX = 0, deltaY = 0, parentBorderwidth = 0;
MacDrawable *macParent = NULL;
- NSWindow *macWindow = TkMacOSXDrawableWindow((Drawable) macWin);
+ NSWindow *macWindow = TkMacOSXDrawableWindow((Drawable)macWin);
/*
* Find the Parent window, for an embedded window it will be its container.
@@ -1094,7 +1094,7 @@ TkMacOSXDrawableWindow(
TkWindow *contWinPtr = TkpGetOtherWindow(macWin->toplevel->winPtr);
if (contWinPtr) {
- result = TkMacOSXDrawableWindow((Drawable) contWinPtr->privatePtr);
+ result = TkMacOSXDrawableWindow((Drawable)contWinPtr->privatePtr);
}
}
return result;
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index fef79a9..a449b4b 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -147,6 +147,7 @@ extern NSString *NSWindowDidOrderOffScreenNotification;
willUseFullScreenContentSize:(NSSize)proposedSize
{
(void)window;
+
/*
* We don't need to change the proposed size, but we do need to implement
* this method. Otherwise the full screen window will be sized to the
@@ -426,8 +427,8 @@ TkpWillDrawWidget(Tk_Window tkwin) {
int result;
if (tkwin) {
TkWindow *winPtr = (TkWindow *)tkwin;
- TKContentView *view = (TKContentView *) TkMacOSXDrawableView(
- (MacDrawable *)winPtr->privatePtr);
+ TKContentView *view = TkMacOSXDrawableView(
+ (Drawable)winPtr->privatePtr);
result = ([NSApp isDrawing] && view == [NSView focusView]);
#if 0
printf("TkpWillDrawWidget: %s %d %d \n", Tk_PathName(tkwin),