fix double-width/height on xterm backend
authorKevin Lamonte <kevin.lamonte@gmail.com>
Mon, 5 Aug 2019 01:55:18 +0000 (20:55 -0500)
committerKevin Lamonte <kevin.lamonte@gmail.com>
Mon, 5 Aug 2019 01:55:18 +0000 (20:55 -0500)
src/jexer/TTerminalWindow.java
src/jexer/backend/SwingTerminal.java

index d703b676007be0d256bc889bd1fa885addfc539c..d1853310349b80c6646d06b6b32e12ea72260cee 100644 (file)
@@ -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)
             ) {
index a11c04edab2cd777411e5e8c183a143c5dce09d0..4cd6d07624010ae8facb31969042f118d59ce44b 100644 (file)
@@ -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 {