Skip to content

Commit f68591b

Browse files
committed
Disable minimize on MacOS
1 parent 2cc7986 commit f68591b

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/js/main.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -194,21 +194,14 @@ function startProcess() {
194194
GUI.log(i18n.getMessage('infoVersionConfigurator', { configuratorVersion: CONFIGURATOR.getDisplayVersion() }));
195195

196196
if (GUI.isNWJS()) {
197-
let nwWindow = GUI.nwGui.Window.get();
197+
const nwWindow = GUI.nwGui.Window.get();
198198
nwWindow.on('new-win-policy', function(frame, url, policy) {
199199
// do not open the window
200200
policy.ignore();
201201
// and open it in external browser
202202
GUI.nwGui.Shell.openExternal(url);
203203
});
204204
nwWindow.on('close', closeHandler);
205-
// TODO: Remove visibilitychange Listener when upgrading to NW2
206-
// capture Command H on MacOS and change it to minimize
207-
document.addEventListener("visibilitychange", function() {
208-
if (GUI.operating_system === "MacOS" && document.visibilityState === "hidden") {
209-
nwWindow.minimize();
210-
}
211-
}, false);
212205
} else if (GUI.isCordova()) {
213206
window.addEventListener('beforeunload', closeHandler);
214207
document.addEventListener('backbutton', function(e) {

0 commit comments

Comments
 (0)