提交 4120c120 编写于 作者: S serb

7160623: [macosx] Editable TextArea/TextField are blocking GUI applications from exit

Reviewed-by: anthony, art
上级 cbc9e50b
......@@ -372,7 +372,7 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent>
}
@Override
public void dispose() {
public final void dispose() {
if (disposed.compareAndSet(false, true)) {
disposeImpl();
}
......
......@@ -81,6 +81,18 @@ abstract class LWTextComponentPeer<T extends TextComponent, D extends JComponent
firstChangeSkipped = true;
}
@Override
protected final void disposeImpl() {
synchronized (getDelegateLock()) {
// visible caret has a timer thread which must be stopped
getTextComponent().getCaret().setVisible(false);
}
super.disposeImpl();
}
/**
* This method should be called under getDelegateLock().
*/
abstract JTextComponent getTextComponent();
public Dimension getPreferredSize(final int rows, final int columns) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册