X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTWindow.java;h=ae3b85dd01fe8e2b0d7379836e14b833e2e792a6;hb=6b45ccfe7dde255ea27c512d8fdf050bb324c5af;hp=58195c915f1ae885485891f159539f53ece7b474;hpb=1db1bc0261a09f2c40c504a9847437a00b51f459;p=nikiroo-utils.git diff --git a/src/jexer/TWindow.java b/src/jexer/TWindow.java index 58195c9..ae3b85d 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