Merge pull request #2961 from haslinghuis/fix-hide-window

Remove disable minimize workaround on MacOS
10.9-maintenance
haslinghuis 2022-07-15 12:18:13 +02:00 committed by GitHub
commit b7d1ec0837
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 8 deletions

View File

@ -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) {