提交 c6149eae 编写于 作者: L leonidr

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

8023994: Right click on the icon added to the system tray for the first time, java.lang.IllegalArgumentException thrown.
Reviewed-by: anthony, serb
上级 000db77f
......@@ -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();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册