mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-17 05:15:21 +03:00
Merge pull request #2446 from haslinghuis/fix_mac_hide
This commit is contained in:
commit
251d1bc8ab
1 changed files with 7 additions and 0 deletions
|
@ -179,6 +179,13 @@ function startProcess() {
|
||||||
GUI.nwGui.Shell.openExternal(url);
|
GUI.nwGui.Shell.openExternal(url);
|
||||||
});
|
});
|
||||||
nwWindow.on('close', closeHandler);
|
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()) {
|
} else if (GUI.isCordova()) {
|
||||||
window.addEventListener('beforeunload', closeHandler);
|
window.addEventListener('beforeunload', closeHandler);
|
||||||
document.addEventListener('backbutton', function(e) {
|
document.addEventListener('backbutton', function(e) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue