<AWT Dev> <AWT dev>[9] Review request for JDK-8147841: [macosx] Updating TrayIcons popup menu does not work on Mac OS X

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Fri Apr 1 15:05:34 UTC 2016

On 01.04.16 13:58, Manajit Halder wrote:
> Case 1) popup and newPopup refers to same object. In cases where the
> same popup menu is used thorughout the execution of the program or both
> of them are null.
>      a) first popup menu is null
> return 0 as address.
>      b) first popup menu is not null
> poupup is already set in the constructor.
> Case 2) popup and newPopup refers to different objects.
>      a) newPopup is not null.
>          i) popup is not null
> call removeNotify() on popup and set it to newPopup
>          ii) popup is null
> set popup to newPoup
>      b) newPopup is null then return 0 address (In this case the first
> popup menu is not checked for null because we are interested in the
> newPopup).

What about the case when the newPopup is null but the old popup is not 
null? Should we call removeNotify() in this case?

Best regards, Sergey.

More information about the awt-dev mailing list