Author wordtech
Recipients Alessandro Rosa, markroseman, ned.deily, ronaldoussoren, taleinat, terry.reedy, wordtech
Date 2015-08-13.01:29:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1439429383.85.0.865881016973.issue24570@psf.upfronthosting.co.za>
In-reply-to
Content
I experimented with Mark's sample code (thanks for that, BTW), and found that the window with the "help" tag applied would display with this simple addition:

raise .t

I believe the equivalent call in Tinter is lift(), because raise() is for error handling? Perhaps someone can experiment with appropriate calls to lift() in the relevant sections of IDLE. 

The "help" style is excluded from becoming a frontmost window by default in OS X. Here is the relevant code in tkMacOSXWm.c:

- (BOOL) canBecomeKeyWindow
{
    TkWindow *winPtr = TkMacOSXGetTkWindow(self);

    return (winPtr && winPtr->wmInfoPtr && (winPtr->wmInfoPtr->macClass ==
	    kHelpWindowClass || winPtr->wmInfoPtr->attributes &
	    kWindowNoActivatesAttribute)) ? NO : YES;
}


Therefore, an explicit call to raise may be helpful in displaying the window.

I realize that such calls are not present in the current IDLE code, and did not seem to be required previously--there likely was some change in recent Tk-Cocoa commits in event loop handling, memory management, window display, and drawing that caused this new bug to crop up. Tracking the actual source of the bug at the C level is likely to prove very difficult because there have been so many changes. However, since the fix at the script level is trivial, I do not think a major effort is necessary to step through the code at the C level.
History
Date User Action Args
2015-08-13 01:29:44wordtechsetrecipients: + wordtech, terry.reedy, ronaldoussoren, taleinat, ned.deily, markroseman, Alessandro Rosa
2015-08-13 01:29:43wordtechsetmessageid: <1439429383.85.0.865881016973.issue24570@psf.upfronthosting.co.za>
2015-08-13 01:29:43wordtechlinkissue24570 messages
2015-08-13 01:29:42wordtechcreate