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 | 4b77870a327e4683be29c0e993a314810df66bf8 (patch) | |
tree | b0354853f6722f5fcd5609aed9c3b276a3ab442b /macosx | |
parent | f44e9d56a8357d65c1315caf19c1c4d005e4151a (diff) | |
download | tk-4b77870a327e4683be29c0e993a314810df66bf8.zip tk-4b77870a327e4683be29c0e993a314810df66bf8.tar.gz tk-4b77870a327e4683be29c0e993a314810df66bf8.tar.bz2 |
Fix from kevin_walzer for buttons in cocoa
Diffstat (limited to 'macosx')
-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)); |