From f68591be58ffc7abe169a6d8c7f648f0573bed02 Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Mon, 27 Jun 2022 23:37:07 +0200 Subject: [PATCH] Disable minimize on MacOS --- src/js/main.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/js/main.js b/src/js/main.js index 4926db60..56a09496 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -194,7 +194,7 @@ function startProcess() { GUI.log(i18n.getMessage('infoVersionConfigurator', { configuratorVersion: CONFIGURATOR.getDisplayVersion() })); if (GUI.isNWJS()) { - let nwWindow = GUI.nwGui.Window.get(); + const nwWindow = GUI.nwGui.Window.get(); nwWindow.on('new-win-policy', function(frame, url, policy) { // do not open the window policy.ignore(); @@ -202,13 +202,6 @@ function startProcess() { GUI.nwGui.Shell.openExternal(url); }); nwWindow.on('close', closeHandler); - // TODO: Remove visibilitychange Listener when upgrading to NW2 - // capture Command H on MacOS and change it to minimize - document.addEventListener("visibilitychange", function() { - if (GUI.operating_system === "MacOS" && document.visibilityState === "hidden") { - nwWindow.minimize(); - } - }, false); } else if (GUI.isCordova()) { window.addEventListener('beforeunload', closeHandler); document.addEventListener('backbutton', function(e) {