* This class uses an xterm/ANSI X3.64/ECMA-48 type terminal to provide a
* screen, keyboard, and mouse to TApplication.
*/
-public class ECMA48Backend extends Backend {
+public final class ECMA48Backend extends Backend {
/**
* Input events are processed by this Terminal.
* Sync the logical screen to the physical device.
*/
@Override
- public final void flushScreen() {
+ public void flushScreen() {
screen.flushPhysical();
}
synchronized (terminal) {
try {
terminal.wait(timeout);
- if (terminal.hasEvents()) {
- // System.err.println("getEvents()");
- terminal.getEvents(queue);
- } else {
- // If I got here, then I timed out. Call
- // terminal.getIdleEvents() to pick up stragglers
- // like bare resize.
- // System.err.println("getIdleEvents()");
- terminal.getIdleEvents(queue);
- }
} catch (InterruptedException e) {
// Spurious interrupt, pretend it was like a timeout.
// System.err.println("[interrupt] getEvents()");
- terminal.getIdleEvents(queue);
+ }
+ if (terminal.hasEvents()) {
+ // System.err.println("getEvents()");
+ terminal.getEvents(queue);
}
}
} else {
* Close the I/O, restore the console, etc.
*/
@Override
- public final void shutdown() {
+ public void shutdown() {
terminal.shutdown();
}