summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authormarc_culler <marc.culler@gmail.com>2020-09-08 16:24:30 (GMT)
committermarc_culler <marc.culler@gmail.com>2020-09-08 16:24:30 (GMT)
commita56a753b41381943366da4d0bfbe307b14ad3eb6 (patch)
tree89cb6563b0f18d6b7d336fba7f6f25745460b282 /macosx
parentd4daf4d9bef6d819c9cc65b9e5140dda427882ef (diff)
downloadtk-a56a753b41381943366da4d0bfbe307b14ad3eb6.zip
tk-a56a753b41381943366da4d0bfbe307b14ad3eb6.tar.gz
tk-a56a753b41381943366da4d0bfbe307b14ad3eb6.tar.bz2
Fix TkMacOSXGetXWindow so it returns a Window, not a Tk_Window cast as a Window.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXWm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index d66c594..3b843b9 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -5401,8 +5401,11 @@ Window
TkMacOSXGetXWindow(
void *macWinPtr)
{
+ Window window = None;
TKWindow *w = (TKWindow *)macWinPtr;
- Window window = (Window) TkMacOSXGetTkWindow(w);
+ if ([w respondsToSelector: @selector (tkWindow)]) {
+ window = [w tkWindow];
+ }
return window ? window : None;
}
@@ -5436,7 +5439,6 @@ Tk_MacOSXGetTkWindow(
}
return (window != None ?
Tk_IdToWindow(dispPtr->display, window) : NULL);
-
}
/*