X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTApplication.java;h=fe90e5d1ef758e05063373c0279add1639d5dc38;hb=710d9525a59ab15b4519ac17adc21999a0fcd9de;hp=14ebacda7f4fa0a645c0958018d1bb8871f332e9;hpb=2bc32111fa17ae50a8aaa09ab347191fefc494a1;p=fanfix.git diff --git a/src/jexer/TApplication.java b/src/jexer/TApplication.java index 14ebacd..fe90e5d 100644 --- a/src/jexer/TApplication.java +++ b/src/jexer/TApplication.java @@ -869,6 +869,11 @@ public class TApplication implements Runnable { // resources. closeAllWindows(); + // Close the desktop. + if (desktop != null) { + setDesktop(null); + } + // Give the overarching application an opportunity to release // resources. onExit(); @@ -1611,6 +1616,8 @@ public class TApplication implements Runnable { */ public final void setDesktop(final TDesktop desktop) { if (this.desktop != null) { + this.desktop.onPreClose(); + this.desktop.onUnfocus(); this.desktop.onClose(); } this.desktop = desktop; @@ -1759,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();