From 6b45ccfe7dde255ea27c512d8fdf050bb324c5af Mon Sep 17 00:00:00 2001 From: Kevin Lamonte Date: Wed, 30 Oct 2019 10:13:44 -0500 Subject: [PATCH] #60 keep focus for all window mouse resize --- src/jexer/TWindow.java | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/jexer/TWindow.java b/src/jexer/TWindow.java index 58195c91..ae3b85dd 100644 --- a/src/jexer/TWindow.java +++ b/src/jexer/TWindow.java @@ -541,12 +541,6 @@ public class TWindow extends TWidget { } if (inWindowResize) { - // Do not permit resizing below the status line - if (mouse.getAbsoluteY() == application.getDesktopBottom()) { - inWindowResize = false; - return; - } - // Move window over setWidth(resizeWindowWidth + (mouse.getAbsoluteX() - moveWindowMouseX)); @@ -566,23 +560,22 @@ public class TWindow extends TWidget { // Keep within min/max bounds if (getWidth() < minimumWindowWidth) { setWidth(minimumWindowWidth); - inWindowResize = false; } if (getHeight() < minimumWindowHeight) { setHeight(minimumWindowHeight); - inWindowResize = false; } if ((maximumWindowWidth > 0) && (getWidth() > maximumWindowWidth) ) { setWidth(maximumWindowWidth); - inWindowResize = false; } if ((maximumWindowHeight > 0) && (getHeight() > maximumWindowHeight) ) { setHeight(maximumWindowHeight); - inWindowResize = false; + } + if (getHeight() + getY() >= getApplication().getDesktopBottom()) { + setHeight(getApplication().getDesktopBottom() - getY()); } // Pass a resize event to my children -- 2.27.0