From: Kevin Lamonte Date: Fri, 25 Aug 2017 19:58:40 +0000 (-0400) Subject: Fix assertions X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=3eacc236973b94764d86b67ce836ae72e05c0687;p=fanfix-jexer.git Fix assertions --- diff --git a/src/jexer/TApplication.java b/src/jexer/TApplication.java index cfa81f4..e6c5819 100644 --- a/src/jexer/TApplication.java +++ b/src/jexer/TApplication.java @@ -1623,6 +1623,12 @@ public class TApplication implements Runnable { windows.remove(0); activeWindow = null; for (TWindow w: windows) { + + // Do not activate a hidden window. + if (w.isHidden()) { + continue; + } + if (w.getZ() > z) { w.setZ(w.getZ() - 1); if (w.getZ() == 0) { diff --git a/src/jexer/TWidget.java b/src/jexer/TWidget.java index 8833f8f..169e557 100644 --- a/src/jexer/TWidget.java +++ b/src/jexer/TWidget.java @@ -438,7 +438,6 @@ public abstract class TWidget implements Comparable { * @return absolute screen column number for the cursor's X position */ public final int getCursorAbsoluteX() { - assert (cursorVisible); return getAbsoluteX() + cursorX; } @@ -448,7 +447,6 @@ public abstract class TWidget implements Comparable { * @return absolute screen row number for the cursor's Y position */ public final int getCursorAbsoluteY() { - assert (cursorVisible); return getAbsoluteY() + cursorY; }