- app.invokeLater(new Runnable() {
- public void run() {
- if (closeAction != null) {
- closeAction.DO();
- }
- if (getApplication() != null) {
- getApplication().postEvent(new TMenuEvent(
- TMenu.MID_REPAINT));
+ if (closeAction != null) {
+ // We have to put this action inside invokeLater() because it
+ // could be executed during draw() when syncing with ECMA48.
+ app.invokeLater(new Runnable() {
+ public void run() {
+ closeAction.DO(TTerminalWidget.this);