8023994: Right click on the icon added to the system tray for the first time, java.lang.IllegalArgumentException thrown

Reviewed-by: anthony, serb
This commit is contained in:
Leonid Romanov 2013-10-02 17:06:09 +04:00
parent efe326ede9
commit 33ff5ac952

View File

@ -116,6 +116,8 @@ abstract public class XBaseMenuWindow extends XWindow {
protected Point grabInputPoint = null;
protected boolean hasPointerMoved = false;
private AppContext disposeAppContext;
/************************************************
*
* Mapping data
@ -174,6 +176,8 @@ abstract public class XBaseMenuWindow extends XWindow {
XBaseMenuWindow() {
super(new XCreateWindowParams(new Object[] {
DELAYED, Boolean.TRUE}));
disposeAppContext = AppContext.getAppContext();
}
/************************************************
@ -904,12 +908,12 @@ abstract public class XBaseMenuWindow extends XWindow {
*/
public void dispose() {
setDisposed(true);
InvocationEvent ev = new InvocationEvent(target, new Runnable() {
SunToolkit.invokeLaterOnAppContext(disposeAppContext, new Runnable() {
public void run() {
doDispose();
}
});
super.postEvent(ev);
}
/**
@ -923,7 +927,6 @@ abstract public class XBaseMenuWindow extends XWindow {
if (oldData != null) {
oldData.invalidate();
}
XToolkit.targetDisposedPeer(target, this);
destroy();
}