git://git.nikiroo.be
/
fanfix.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8dd530f
)
keyboard cancel mouse window move/size
author
Kevin Lamonte
<kevin.lamonte@gmail.com>
Sat, 31 Aug 2019 20:36:00 +0000
(15:36 -0500)
committer
Kevin Lamonte
<kevin.lamonte@gmail.com>
Sat, 31 Aug 2019 20:36:00 +0000
(15:36 -0500)
src/jexer/TWindow.java
patch
|
blob
|
blame
|
history
diff --git
a/src/jexer/TWindow.java
b/src/jexer/TWindow.java
index e0a20734341f3f19405810df7ad3595ff3058a25..58195c915f1ae885485891f159539f53ece7b474 100644
(file)
--- 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