On Jul 26, 2013, at 12:56 PM, Anthony Petrov <[email protected]> wrote:
> Hi Leonid,
>
> AWTWindow.m
>> 568 - (void) windowDidResignKey: (NSNotification *) notification {
>> 572 [self.javaMenuBar deactivate];
>> 574 CMenuBar* defaultMenu = [[ApplicationDelegate sharedDelegate]
>> defaultMenuBar];
>> 575 if (defaultMenu != nil) {
>> 576 [CMenuBar activate:defaultMenu modallyDisabled:NO];
>> 577 }
>
> Note that this may cause brief menu flickering if the very next event is
> windowDidBecomeKey for another window with a non-null menu bar. But we really
> can't predict whether a window belonging to our app will receive focus or
> not, so there doesn't seem to be a better way to handle this situation
> anyway. I'd suggest to add a comment here stating that the problem is known.
>
> The fix looks fine otherwise. Please consider it approved.
>
Yeah, I've tried, but couldn't cause any flickering. My guess this is because
windowDidBecomeKey/windowDiidResignKey are called within the same internal
method, so perhaps all menus redrawing happens only during the next run loop
iteration, or may be the interval between
windowDidBecomeKey/windowDiidResignKey is too short.
> --
> best regards,
> Anthony
>
> On 07/26/2013 04:54 AM, Leonid Romanov wrote:
>> Hi,
>> Please review a fix for 8007267: [macosx]
>> com.apple.eawt.Application.setDefaultMenuBar is not working. It doesn't work
>> because a bunch of code required to make it work is commented out. So, I've
>> uncommented it, but since it isn't enough, I've also done a number of
>> additional minor modifications.
>>
>> Bug: http://bugs.sun.com/view_bug.do?bug_id=8007267
>> webrev: http://cr.openjdk.java.net/~leonidr/8007267/webrev.00/
>>
>> Thanks,
>> Leonid.
>>