Add 'src/jexer/' from commit 'cf01c92f5809a0732409e280fb0f32f27393618d'
[nikiroo-utils.git] / src / jexer / TApplication.java
index affc6ce4d1487118a23aa30d5673ad23c648f409..9d27c10f5420052103cee046baae697ca8c2bd6e 100644 (file)
@@ -1766,6 +1766,19 @@ public class TApplication implements Runnable {
             }
         }
 
+        // If this cell is on top of the desktop, and the desktop has
+        // requested a hidden mouse, bail out.
+        if ((desktop != null) && (activeWindow == null) && (activeMenu == null)) {
+            if ((desktop.hasHiddenMouse() == true)
+                && (x > desktop.getX())
+                && (x < desktop.getX() + desktop.getWidth() - 1)
+                && (y > desktop.getY())
+                && (y < desktop.getY() + desktop.getHeight() - 1)
+            ) {
+                return;
+            }
+        }
+
         Cell cell = getScreen().getCharXY(x, y);
         if (cell.isImage()) {
             cell.invertImage();
@@ -2189,9 +2202,6 @@ public class TApplication implements Runnable {
 
         assert (!window.isActive());
         if (activeWindow != null) {
-            // TODO: see if this assertion is really necessary.
-            // assert (activeWindow.getZ() == 0);
-
             activeWindow.setActive(false);
 
             // Increment every window Z that is on top of window