From 6c6350c0af0a23121155e0870dbd2ac7cfbd3d25 Mon Sep 17 00:00:00 2001 From: Kevin Walzer Date: Sun, 25 Aug 2013 03:11:59 +0000 Subject: Fix for 3016181, thanks to Tom Goddard for patch --- macosx/tkMacOSXButton.c | 4 ++-- macosx/tkMacOSXMenu.c | 2 +- macosx/tkMacOSXScrlbr.c | 2 ++ macosx/tkMacOSXWm.c | 11 ++++++++--- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index f912b81..f77a74e 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -429,7 +429,7 @@ ComputeNativeButtonGeometry( } break; case TYPE_RADIO_BUTTON: - case TYPE_CHECK_BUTTON: + case TYPE_CHECK_BUTTON: if (!haveImage /*|| butPtr->indicatorOn*/) { // TODO: indicatorOn type = butPtr->type == TYPE_RADIO_BUTTON ? NSRadioButton : NSSwitchButton; @@ -454,7 +454,7 @@ ComputeNativeButtonGeometry( } [button setButtonType:type]; if (style) { - [button setBezelStyle:style]; + [button setBezelStyle:style]; } if (highlightsBy) { [cell setHighlightsBy:highlightsBy|[cell highlightsBy]]; diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index 2b4dbc8..7116050 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.c @@ -827,7 +827,7 @@ TkpSetWindowMenuBar( * *---------------------------------------------------------------------- */ - + void TkpSetMainMenubar( Tcl_Interp *interp, /* The interpreter of the application */ diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c index ff91ffd..4b3bc31 100644 --- a/macosx/tkMacOSXScrlbr.c +++ b/macosx/tkMacOSXScrlbr.c @@ -254,6 +254,8 @@ TkpDestroyScrollbar( TkScrollbar *scrollPtr) { MacScrollbar *macScrollPtr = (MacScrollbar *) scrollPtr; + NSScroller *scroller = macScrollPtr->scroller; + [scroller setTag:(NSInteger)0]; TkMacOSXMakeCollectableAndRelease(macScrollPtr->scroller); } diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index fbc167d..b834766 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -20,6 +20,7 @@ #include "tkMacOSXWm.h" #include "tkMacOSXEvent.h" #include "tkMacOSXDebug.h" +#include /* #ifdef TK_MAC_DEBUG @@ -351,6 +352,7 @@ static void RemapWindows(TkWindow *winPtr, kHelpWindowClass || winPtr->wmInfoPtr->attributes & kWindowNoActivatesAttribute)) ? NO : YES; } + @end #pragma mark - @@ -5187,6 +5189,7 @@ WmWinStyle( { "brown", NULL }, { "clear", NULL }, { "opacity", NULL }, + { "fullscreen", NULL }, { NULL } }; @@ -6320,7 +6323,7 @@ TkMacOSXMakeFullscreen( NSRect bounds = [window contentRectForFrameRect:[window frame]]; NSRect screenBounds = NSMakeRect(0, 0, screenWidth, screenHeight); - if (!NSEqualRects(bounds, screenBounds) && !wasFullscreen) { + if (!NSEqualRects(bounds, screenBounds) && !wasFullscreen) { wmPtr->configX = wmPtr->x; wmPtr->configY = wmPtr->y; wmPtr->configAttributes = wmPtr->attributes; @@ -6329,7 +6332,8 @@ TkMacOSXMakeFullscreen( wmPtr->configAttributes, wmPtr->flags, 1, 0); wmPtr->flags |= WM_SYNC_PENDING; [window setFrame:[window frameRectForContentRect: - screenBounds] display:YES]; + screenBounds] display:YES]; + wmPtr->flags &= ~WM_SYNC_PENDING; } wmPtr->flags |= WM_FULLSCREEN; @@ -6347,7 +6351,8 @@ TkMacOSXMakeFullscreen( prevPres = [NSApp presentationOptions]; [window setStyleMask: NSBorderlessWindowMask]; [NSApp setPresentationOptions: NSApplicationPresentationAutoHideDock - | NSApplicationPresentationAutoHideMenuBar]; + | NSApplicationPresentationAutoHideMenuBar]; + #endif /*TK_GOT_AT_LEAST_SNOW_LEOPARD*/ } else { wmPtr->flags &= ~WM_FULLSCREEN; -- cgit v0.12 From 1ad587f895cedd44e6f9ce21170a7e4a9c40815e Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 26 Aug 2013 11:00:13 +0000 Subject: Bug [c597acdab3]: Call [$pb step] in tail position in ttk::progressbar::Autoincrement, so that the widget is in a consistent state when any write traces on the linked -variable are fired --- ChangeLog | 14 ++++++++++++++ library/ttk/progress.tcl | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1b40951..88f14ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2013-08-25 Kevin Walzer + + * macosx/tkMacOSXButton.c: Bug [3016181]: Crash after scrollbar + * macosx/tkMacOSXMenu.c: destroyed, Tk Cocoa. + * macosx/tkMacOSXScrlbr.c: + * macosx/tkMacOSXWm.c: + +2012-08-15 Joe English + + * library/ttk/progress.tcl: Bug [c597acdab3]: Call [$pb step] + in tail position in ttk::progressbar::Autoincrement, so that + the widget is in a consistent state when any write traces on + the linked -variable are fired. + 2013-07-02 Jan Nijtmans * unix/tcl.m4: Bug [32afa6e256]: dirent64 check is incorrect in tcl.m4 diff --git a/library/ttk/progress.tcl b/library/ttk/progress.tcl index b6e2ffb..34dce72 100644 --- a/library/ttk/progress.tcl +++ b/library/ttk/progress.tcl @@ -18,10 +18,10 @@ proc ttk::progressbar::Autoincrement {pb steptime stepsize} { return } - $pb step $stepsize - set Timers($pb) [after $steptime \ [list ttk::progressbar::Autoincrement $pb $steptime $stepsize] ] + + $pb step $stepsize } # ttk::progressbar::start -- -- cgit v0.12