From: Kevin Lamonte Date: Sat, 31 Aug 2019 20:36:00 +0000 (-0500) Subject: keyboard cancel mouse window move/size X-Git-Tag: fanfix-swing-0.0.1~12^2~13^2~28 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=1aff59b62f29796a10834bc2e054d75b5d902c5e;p=fanfix-swing.git keyboard cancel mouse window move/size --- diff --git a/src/jexer/TWindow.java b/src/jexer/TWindow.java index e0a20734..58195c91 100644 --- a/src/jexer/TWindow.java +++ b/src/jexer/TWindow.java @@ -608,6 +608,15 @@ public class TWindow extends TWidget { @Override public void onKeypress(final TKeypressEvent keypress) { + if (inWindowMove || inWindowResize) { + // ESC or ENTER - Exit size/move + if (keypress.equals(kbEsc) || keypress.equals(kbEnter)) { + inWindowMove = false; + inWindowResize = false; + return; + } + } + if (inKeyboardResize) { // ESC or ENTER - Exit size/move