jdk/src/windows/classes/sun/awt/windows/WComponentPeer.java
Print this page
rev 5693 : 7192977: Issue in toolkit thread
Reviewed-by: skoivu, rupashka, art
@@ -494,13 +494,14 @@
// REMIND : what do we do if our surface creation failed?
}
}
}
};
+ Component c = (Component)target;
// Fix 6255371.
- if (!PaintEventDispatcher.getPaintEventDispatcher().queueSurfaceDataReplacing((Component)target, r)) {
- postEvent(new InvocationEvent(Toolkit.getDefaultToolkit(), r));
+ if (!PaintEventDispatcher.getPaintEventDispatcher().queueSurfaceDataReplacing(c, r)) {
+ postEvent(new InvocationEvent(c, r));
}
}
public boolean updateGraphicsData(GraphicsConfiguration gc) {
winGraphicsConfig = (Win32GraphicsConfig)gc;
@@ -618,11 +619,11 @@
WToolkit.targetDisposedPeer(target, this);
_dispose();
}
public void disposeLater() {
- postEvent(new InvocationEvent(Toolkit.getDefaultToolkit(), new Runnable() {
+ postEvent(new InvocationEvent(target, new Runnable() {
public void run() {
dispose();
}
}));
}