mirror of
https://github.com/openjdk/jdk.git
synced 2026-07-19 23:48:50 +00:00
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:
parent
efe326ede9
commit
33ff5ac952
@ -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();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user