From 3eacc236973b94764d86b67ce836ae72e05c0687 Mon Sep 17 00:00:00 2001 From: Kevin Lamonte Date: Fri, 25 Aug 2017 15:58:40 -0400 Subject: [PATCH] Fix assertions --- src/jexer/TApplication.java | 6 ++++++ src/jexer/TWidget.java | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) 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; } -- 2.27.0