< prev index next >
src/java.desktop/macosx/classes/sun/lwawt/macosx/CTrayIcon.java
Print this page
*** 97,114 ****
private native long nativeCreate();
//invocation from the AWTTrayIcon.m
public long getPopupMenuModel(){
! if(popup == null) {
! PopupMenu popupMenu = target.getPopupMenu();
! if (popupMenu != null) {
! popup = popupMenu;
} else {
return 0L;
}
}
return checkAndCreatePopupPeer().getModel();
}
/**
* We display tray icon message as a small dialog with OK button.
--- 97,119 ----
private native long nativeCreate();
//invocation from the AWTTrayIcon.m
public long getPopupMenuModel(){
! if(popup != null) {
! PopupMenu newPopup = target.getPopupMenu();
! if (popup != newPopup) {
! if (newPopup != null) {
! popup = newPopup;
} else {
return 0L;
}
}
+ } else {
+ return 0L;
+ }
+
return checkAndCreatePopupPeer().getModel();
}
/**
* We display tray icon message as a small dialog with OK button.
< prev index next >