Author: jruchaud Date: 2015-05-22 15:31:41 +0000 (Fri, 22 May 2015) New Revision: 1450 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1450 Log: Fix multiple tray Modified: wit/js/gui.js wit/js/main.js Modified: wit/js/gui.js =================================================================== --- wit/js/gui.js 2015-05-22 15:07:51 UTC (rev 1449) +++ wit/js/gui.js 2015-05-22 15:31:41 UTC (rev 1450) @@ -11,10 +11,6 @@ // Get the minimize event win.on("minimize", function() { - // Hide window - this.hide(); - - // Show tray tray = new gui.Tray({icon: "img/stopwatch-34108_640.png"}); var menu = new gui.Menu(); @@ -28,4 +24,14 @@ this.remove(); tray = null; }); + + // Hide window + this.hide(); }); + +win.on("focus", function() { + if (tray) { + tray.remove(); + tray = null; + } +}); Modified: wit/js/main.js =================================================================== --- wit/js/main.js 2015-05-22 15:07:51 UTC (rev 1449) +++ wit/js/main.js 2015-05-22 15:31:41 UTC (rev 1450) @@ -131,7 +131,7 @@ window.on("close", function() { this.hide(); // Pretend to be closed already -// this.close(true); + this.close(true); popups.splice(popups.indexOf(window), 1);
participants (1)
-
jruchaud@users.nuiton.org