X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTApplication.java;h=20406b1f8e82aa654efa86081c085d5f3883af03;hb=00691e80f2f135f92be739e2b7e86775a2357276;hp=41981daf3c3ca0e3943223534de125e0c943d835;hpb=e23ea53820244957b17a7000c6d3e1ff586f1ef0;p=nikiroo-utils.git diff --git a/src/jexer/TApplication.java b/src/jexer/TApplication.java index 41981da..20406b1 100644 --- a/src/jexer/TApplication.java +++ b/src/jexer/TApplication.java @@ -1522,7 +1522,26 @@ public class TApplication implements Runnable { if (debugThreads) { System.err.printf("%d %s invertCell() %d %d\n", System.currentTimeMillis(), Thread.currentThread(), x, y); + + if (activeWindow != null) { + System.err.println("activeWindow.hasHiddenMouse() " + + activeWindow.hasHiddenMouse()); + } } + + // If this cell is on top of a visible window that has requested a + // hidden mouse, bail out. + if ((activeWindow != null) && (activeMenu == null)) { + if ((activeWindow.hasHiddenMouse() == true) + && (x > activeWindow.getX()) + && (x < activeWindow.getX() + activeWindow.getWidth() - 1) + && (y > activeWindow.getY()) + && (y < activeWindow.getY() + activeWindow.getHeight() - 1) + ) { + return; + } + } + Cell cell = getScreen().getCharXY(x, y); if (cell.isImage()) { cell.invertImage(); @@ -3298,7 +3317,7 @@ public class TApplication implements Runnable { public final TTerminalWindow openTerminal(final int x, final int y, final int flags, final String commandLine) { - return new TTerminalWindow(this, x, y, flags, commandLine.split("\\s")); + return new TTerminalWindow(this, x, y, flags, commandLine.split("\\s+")); } /** @@ -3315,7 +3334,7 @@ public class TApplication implements Runnable { public final TTerminalWindow openTerminal(final int x, final int y, final int flags, final String commandLine, final boolean closeOnExit) { - return new TTerminalWindow(this, x, y, flags, commandLine.split("\\s"), + return new TTerminalWindow(this, x, y, flags, commandLine.split("\\s+"), closeOnExit); }