diff options
author | Mark Haslinghuis <mark@numloq.nl> | 2022-06-28 00:37:07 +0300 |
---|---|---|
committer | Mark Haslinghuis <mark@numloq.nl> | 2022-07-07 22:54:57 +0300 |
commit | f68591be58ffc7abe169a6d8c7f648f0573bed02 (patch) | |
tree | 6a980d1b749a74726eb0fe737bf019eac0f7ad9a | |
parent | 2cc798641bdcb02c6ca970ef28f7e27e05cd3270 (diff) |
Disable minimize on MacOS
-rw-r--r-- | src/js/main.js | 9 |
1 files changed, 1 insertions, 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) { |