7160623: [macosx] Editable TextArea/TextField are blocking GUI applications from exit
Reviewed-by: anthony, art
This commit is contained in:
parent
4d0e923a60
commit
0705c62050
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user