From: Kevin Lamonte Date: Wed, 6 Nov 2019 17:02:29 +0000 (-0600) Subject: performance X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=ee831bf6d859effbe0069991267e13d5bbca5861;p=nikiroo-utils.git performance --- diff --git a/examples/JexerTilingWindowManager2.java b/examples/JexerTilingWindowManager2.java index 2a1512d..0e360b6 100644 --- a/examples/JexerTilingWindowManager2.java +++ b/examples/JexerTilingWindowManager2.java @@ -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; } diff --git a/src/jexer/TApplication.java b/src/jexer/TApplication.java index 13cd079..dba59d7 100644 --- a/src/jexer/TApplication.java +++ b/src/jexer/TApplication.java @@ -1599,6 +1599,7 @@ public class TApplication implements Runnable { invoke.run(); } invokeLaters.clear(); + doRepaint(); } } diff --git a/src/jexer/TTerminalWidget.java b/src/jexer/TTerminalWidget.java index d36ca2c..8c01e12 100644 --- a/src/jexer/TTerminalWidget.java +++ b/src/jexer/TTerminalWidget.java @@ -910,10 +910,7 @@ public class TTerminalWidget extends TScrollableWidget } }); } - if (getApplication() != null) { - getApplication().postEvent(new TMenuEvent( - TMenu.MID_REPAINT)); - } + app.doRepaint(); } } diff --git a/src/jexer/tterminal/ECMA48.java b/src/jexer/tterminal/ECMA48.java index 12e7a2b..ce06c36 100644 --- a/src/jexer/tterminal/ECMA48.java +++ b/src/jexer/tterminal/ECMA48.java @@ -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.