X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fcom%2Fgooglecode%2Flanterna%2Fterminal%2Fswing%2FGraphicalTerminalImplementation.java;h=085f38a24013cd262ae4d63544722cde22febf30;hb=a73a906356c971b080c36368e71a15d87e8b8d31;hp=8c444a86ff8a167b344a0e4bd8a2efceef2f0145;hpb=a3b510ab4bf89a7a2a05f3851ffe0f030b8a78f4;p=jvcard.git diff --git a/src/com/googlecode/lanterna/terminal/swing/GraphicalTerminalImplementation.java b/src/com/googlecode/lanterna/terminal/swing/GraphicalTerminalImplementation.java index 8c444a8..085f38a 100644 --- a/src/com/googlecode/lanterna/terminal/swing/GraphicalTerminalImplementation.java +++ b/src/com/googlecode/lanterna/terminal/swing/GraphicalTerminalImplementation.java @@ -249,10 +249,10 @@ abstract class GraphicalTerminalImplementation implements IOSafeTerminal { // At this point, if the user hasn't asked for an explicit flush, just paint the backbuffer. It's prone to // problems if the user isn't flushing properly but it reduces flickering when resizing the window and the code // is asynchronously responding to the resize - //if(flushed) { + if(flushed) { updateBackBuffer(fontWidth, fontHeight, terminalResized, terminalSize); flushed = false; - //} + } componentGraphics.drawImage(backbuffer, 0, 0, getWidth(), getHeight(), 0, 0, getWidth(), getHeight(), null); @@ -269,8 +269,6 @@ abstract class GraphicalTerminalImplementation implements IOSafeTerminal { //Setup the graphics object Graphics2D backbufferGraphics = backbuffer.createGraphics(); - backbufferGraphics.setColor(colorConfiguration.toAWTColor(TextColor.ANSI.DEFAULT, false, false)); - backbufferGraphics.fillRect(0, 0, getWidth(), getHeight()); if(isTextAntiAliased()) { backbufferGraphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); @@ -309,7 +307,7 @@ abstract class GraphicalTerminalImplementation implements IOSafeTerminal { (deviceConfiguration.isCursorBlinking() && blinkOn)); //If the cursor is blinking, only draw when blinkOn is true CharacterState characterState = new CharacterState(character, foregroundColor, backgroundColor, drawCursor); - //if(!characterState.equals(visualState[rowIndex][columnIndex]) || terminalResized) { + if(!characterState.equals(visualState[rowIndex][columnIndex]) || terminalResized) { drawCharacter(backbufferGraphics, character, columnIndex, @@ -324,7 +322,7 @@ abstract class GraphicalTerminalImplementation implements IOSafeTerminal { if(TerminalTextUtils.isCharCJK(character.getCharacter())) { visualState[rowIndex][columnIndex+1] = characterState; } - //} + } if(character.getModifiers().contains(SGR.BLINK)) { foundBlinkingCharacters = true;