From 9d990083da421ec7151d7462afa96305273af483 Mon Sep 17 00:00:00 2001 From: Kevin Lamonte Date: Sun, 4 Aug 2019 20:55:18 -0500 Subject: [PATCH] fix double-width/height on xterm backend --- src/jexer/TTerminalWindow.java | 9 ++------- src/jexer/backend/SwingTerminal.java | 9 +++++++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/jexer/TTerminalWindow.java b/src/jexer/TTerminalWindow.java index d703b67..d185331 100644 --- a/src/jexer/TTerminalWindow.java +++ b/src/jexer/TTerminalWindow.java @@ -997,13 +997,8 @@ public class TTerminalWindow extends TScrollableWindow gr2.setFont(doubleFont); // Draw the background rectangle, then the foreground character. - if (getScreen() instanceof ECMA48Terminal) { - // BUG: the background color is coming in the same as the - // foreground color. For now, don't draw it. - } else { - gr2.setColor(SwingTerminal.attrToBackgroundColor(cell)); - gr2.fillRect(0, 0, image.getWidth(), image.getHeight()); - } + gr2.setColor(SwingTerminal.attrToBackgroundColor(cell)); + gr2.fillRect(0, 0, image.getWidth(), image.getHeight()); if (!cell.isBlink() || (cell.isBlink() && cursorBlinkVisible) ) { diff --git a/src/jexer/backend/SwingTerminal.java b/src/jexer/backend/SwingTerminal.java index a11c04e..4cd6d07 100644 --- a/src/jexer/backend/SwingTerminal.java +++ b/src/jexer/backend/SwingTerminal.java @@ -301,6 +301,13 @@ public class SwingTerminal extends LogicalScreen // Constructors ----------------------------------------------------------- // ------------------------------------------------------------------------ + /** + * Static constructor. + */ + static { + setDOSColors(); + } + /** * Public constructor creates a new JFrame to render to. * @@ -316,7 +323,6 @@ public class SwingTerminal extends LogicalScreen this.fontSize = fontSize; - setDOSColors(); reloadOptions(); try { @@ -438,7 +444,6 @@ public class SwingTerminal extends LogicalScreen this.fontSize = fontSize; - setDOSColors(); reloadOptions(); try { -- 2.27.0