performance
authorKevin Lamonte <kevin.lamonte@gmail.com>
Wed, 6 Nov 2019 17:02:29 +0000 (11:02 -0600)
committerKevin Lamonte <kevin.lamonte@gmail.com>
Wed, 6 Nov 2019 17:02:29 +0000 (11:02 -0600)
examples/JexerTilingWindowManager2.java
src/jexer/TApplication.java
src/jexer/TTerminalWidget.java
src/jexer/tterminal/ECMA48.java

index 2a1512d6ec7af63edb12d10c9fed309d093eef32..0e360b6d04c1d9e0e4d4dc1306992c111ff2ae01 100644 (file)
@@ -146,6 +146,8 @@ public class JexerTilingWindowManager2 extends TApplication {
     private void createRootTerminal() {
         assert (root == null);
         disableMenuItem(MENU_RESPAWN_ROOT);
+        enableMenuItem(MENU_SPLIT_VERTICAL);
+        enableMenuItem(MENU_SPLIT_HORIZONTAL);
         root = createTerminal();
     }
 
@@ -165,6 +167,10 @@ public class JexerTilingWindowManager2 extends TApplication {
                     } else {
                         source.getApplication().enableMenuItem(
                                 MENU_RESPAWN_ROOT);
+                        source.getApplication().disableMenuItem(
+                                MENU_SPLIT_VERTICAL);
+                        source.getApplication().disableMenuItem(
+                                MENU_SPLIT_HORIZONTAL);
                         source.remove();
                         root = null;
                     }
index 13cd07958ee3a61c9b36e2a76cf0f2560e48920a..dba59d7d7eaab7bc3f8f4c2e3f9866c1194ce713 100644 (file)
@@ -1599,6 +1599,7 @@ public class TApplication implements Runnable {
                 invoke.run();
             }
             invokeLaters.clear();
+            doRepaint();
         }
 
     }
index d36ca2cb6e8a3bf8614b6ff632c18877efe06af1..8c01e120618ebf0fc933c4a0da4ed9c47f8cc545 100644 (file)
@@ -910,10 +910,7 @@ public class TTerminalWidget extends TScrollableWidget
                     }
                 });
             }
-            if (getApplication() != null) {
-                getApplication().postEvent(new TMenuEvent(
-                    TMenu.MID_REPAINT));
-            }
+            app.doRepaint();
         }
     }
 
index 12e7a2bc3638b22d2aa19651661a2e899d167afb..ce06c36bebfb8fd525b262e3097359695c15dd34 100644 (file)
@@ -1025,11 +1025,6 @@ public class ECMA48 implements Runnable {
         // the input streams.
         if (stopReaderThread == false) {
             stopReaderThread = true;
-            try {
-                readerThread.join(1000);
-            } catch (InterruptedException e) {
-                // SQUASH
-            }
         }
 
         // Now close the output stream.