X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fbackend%2FECMA48Backend.java;h=da9c9c35d8f13794cd820311eedcdd1ffc0fc99a;hb=a83fea2bae838f4b9bbf59ce3832e0e67be41378;hp=a6ae361c791d975c152587aaaebbf62a11e85d14;hpb=7b5261bc5b641e0769902f014e3b21f61050b02b;p=fanfix.git diff --git a/src/jexer/backend/ECMA48Backend.java b/src/jexer/backend/ECMA48Backend.java index a6ae361..da9c9c3 100644 --- a/src/jexer/backend/ECMA48Backend.java +++ b/src/jexer/backend/ECMA48Backend.java @@ -43,7 +43,7 @@ import jexer.io.ECMA48Terminal; * 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. @@ -84,7 +84,7 @@ public class ECMA48Backend extends Backend { * Sync the logical screen to the physical device. */ @Override - public final void flushScreen() { + public void flushScreen() { screen.flushPhysical(); } @@ -103,20 +103,13 @@ public class ECMA48Backend extends Backend { 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 { @@ -130,7 +123,7 @@ public class ECMA48Backend extends Backend { * Close the I/O, restore the console, etc. */ @Override - public final void shutdown() { + public void shutdown() { terminal.shutdown(); }