Fix assertions
[fanfix.git] / src / jexer / TApplication.java
index cfa81f4bab05f6508cdbefe7acb53ed096a1df1e..e6c5819a22c58fb2195e0cfe185a7c4d8c43a2b1 100644 (file)
@@ -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) {