diff options
author | marc_culler <marc.culler@gmail.com> | 2020-09-08 16:25:23 (GMT) |
---|---|---|
committer | marc_culler <marc.culler@gmail.com> | 2020-09-08 16:25:23 (GMT) |
commit | c2c6590a6232b4dd7adbff4a8a3acd4cbcc89016 (patch) | |
tree | ea173996b7f8462cebc731561a746840c78625bd /macosx/tkMacOSXWm.c | |
parent | 7ab30c7f2e1462813cea109e17ee831c659e01ca (diff) | |
parent | a56a753b41381943366da4d0bfbe307b14ad3eb6 (diff) | |
download | tk-c2c6590a6232b4dd7adbff4a8a3acd4cbcc89016.zip tk-c2c6590a6232b4dd7adbff4a8a3acd4cbcc89016.tar.gz tk-c2c6590a6232b4dd7adbff4a8a3acd4cbcc89016.tar.bz2 |
Fix TkMacOSXGetXWindow so it returns a Window, not a Tk_Window cast as a Window.
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r-- | macosx/tkMacOSXWm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index fba6c63..e6d2255 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -5382,8 +5382,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; } @@ -5417,7 +5420,6 @@ Tk_MacOSXGetTkWindow( } return (window != None ? Tk_IdToWindow(dispPtr->display, window) : NULL); - } /* |