Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/betaflight/betaflight-configurator.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Haslinghuis <mark@numloq.nl>2022-06-28 00:37:07 +0300
committerMark Haslinghuis <mark@numloq.nl>2022-07-07 22:54:57 +0300
commitf68591be58ffc7abe169a6d8c7f648f0573bed02 (patch)
tree6a980d1b749a74726eb0fe737bf019eac0f7ad9a
parent2cc798641bdcb02c6ca970ef28f7e27e05cd3270 (diff)
Disable minimize on MacOS
-rw-r--r--src/js/main.js9
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) {