1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-16 21:05:30 +03:00

Merge pull request #2446 from haslinghuis/fix_mac_hide

This commit is contained in:
Michael Keller 2021-03-22 00:01:59 +13:00 committed by GitHub
commit 251d1bc8ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -179,6 +179,13 @@ 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) {