diff options
author | hypnotoad <yoda@etoyoc.com> | 2014-08-27 14:52:58 (GMT) |
---|---|---|
committer | hypnotoad <yoda@etoyoc.com> | 2014-08-27 14:52:58 (GMT) |
commit | 94cd41bca17091f9de05687ef4cc17e70316238a (patch) | |
tree | b0354853f6722f5fcd5609aed9c3b276a3ab442b /macosx/tkMacOSXButton.c | |
parent | f519c380a7f8158faeaa67fc154cef64f4ac9a8e (diff) | |
download | tk-94cd41bca17091f9de05687ef4cc17e70316238a.zip tk-94cd41bca17091f9de05687ef4cc17e70316238a.tar.gz tk-94cd41bca17091f9de05687ef4cc17e70316238a.tar.bz2 |
Fix from kevin_walzer for buttons in cocoa
Diffstat (limited to 'macosx/tkMacOSXButton.c')
-rw-r--r-- | macosx/tkMacOSXButton.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index 4e7904c..9858f88 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -186,6 +186,7 @@ TkpDestroyButton( TkButton *butPtr) { MacButton *macButtonPtr = (MacButton *) butPtr; + [macButtonPtr->button setTag:(NSInteger)-1]; TkMacOSXMakeCollectableAndRelease(macButtonPtr->button); TkMacOSXMakeCollectableAndRelease(macButtonPtr->selectImage); @@ -375,17 +376,10 @@ NSRect TkMacOSXGetButtonFrame( { MacButton *macButtonPtr = (MacButton *) butPtr; Tk_Window tkwin = butPtr->tkwin; - unsigned short tkwint=(unsigned int)tkwin; TkWindow *winPtr = (TkWindow *) tkwin; - if(tkwint==0xffffffff || tkwint==0) { - return NSZeroRect; - } if (tkwin) { MacDrawable *macWin = (MacDrawable *) winPtr->window; NSView *view = TkMacOSXDrawableView(macWin); - if(view==nil) { - return NSZeroRect; - } CGFloat viewHeight = [view bounds].size.height; NSRect frame = NSMakeRect(macWin->xOff, macWin->yOff, Tk_Width(tkwin), Tk_Height(tkwin)); |