<AWT Dev> <AWT dev> Review request for JDK-8147841: [macosx] Updating TrayIcons popup menu does not work on Mac OS X
manajit.halder at oracle.com
Mon Apr 4 09:36:38 UTC 2016
In that case we have two options:
Depend on the dispose() method to call removeNotify() on the old popup.
To call the removeNotify() here in this case.
Current implementation depends on the dispose() method to call removeNotify() on the old popup.
> On 01-Apr-2016, at 8:35 pm, Sergey Bylokhov <Sergey.Bylokhov at oracle.com> wrote:
> 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
> 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