From: Kevin Lamonte Date: Wed, 6 Nov 2019 17:02:29 +0000 (-0600) Subject: performance X-Git-Tag: fanfix-swing-0.0.1~12^2~13^2^2~22 X-Git-Url: http://git.nikiroo.be/?a=commitdiff_plain;h=ee831bf6d859effbe0069991267e13d5bbca5861;p=fanfix-swing.git performance --- diff --git a/examples/JexerTilingWindowManager2.java b/examples/JexerTilingWindowManager2.java index 2a1512d6..0e360b6d 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 13cd0795..dba59d7d 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 d36ca2cb..8c01e120 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 12e7a2bc..ce06c36b 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.