From d372dabf08248cddd5705a24c327decd6d5ffefb Mon Sep 17 00:00:00 2001 From: Kevin Walzer Date: Tue, 2 Oct 2012 00:49:25 +0000 Subject: Fix for 3572016, menus not re-enabling after modal dialog --- macosx/tkMacOSXMenu.c | 6 ++++++ macosx/tkMacOSXNotify.c | 2 +- macosx/tkMacOSXSubwindows.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index 8054c57..83ad47a 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.c @@ -236,6 +236,12 @@ static int ModifierCharWidth(Tk_Font tkfont); return [menuItem isEnabled]; } +// Workaround for bug 3572016; leaves menu items enabled during modal dialog. +- (BOOL)worksWhenModal +{ + return YES; +} + - (void) tkMenuItemInvoke: (id) sender { /* diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c index 689f45e..3e0dfde 100644 --- a/macosx/tkMacOSXNotify.c +++ b/macosx/tkMacOSXNotify.c @@ -274,7 +274,7 @@ TkMacOSXEventsCheckProc( TSD_INIT(); if (tsdPtr->currentEvent) { currentEvent = TkMacOSXMakeCollectableAndAutorelease( - tsdPtr->currentEvent); + tsdPtr->currentEvent); } do { modalSession = TkMacOSXGetModalSession(); diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c index 8cf8d65..18276fb 100644 --- a/macosx/tkMacOSXSubwindows.c +++ b/macosx/tkMacOSXSubwindows.c @@ -65,7 +65,7 @@ XDestroyWindow( TkMacOSXSelDeadWindow(macWin->winPtr); macWin->toplevel->referenceCount--; - if (!Tk_IsTopLevel(macWin->winPtr)) { + if (!Tk_IsTopLevel(macWin->winPtr) ) { TkMacOSXInvalidateWindow(macWin, TK_PARENT_WINDOW); if (macWin->winPtr->parentPtr != NULL) { TkMacOSXInvalClipRgns((Tk_Window) macWin->winPtr->parentPtr); -- cgit v0.12