Skip to content

Commit 963bd98

Browse files
authored
perf - disable electron from setting a default menu (microsoft#159660)
1 parent b358daf commit 963bd98

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const { getUserDataPath } = require('./vs/platform/environment/node/userDataPath
2424
const { stripComments } = require('./vs/base/common/stripComments');
2525
/** @type {Partial<IProductConfiguration>} */
2626
const product = require('../product.json');
27-
const { app, protocol, crashReporter } = require('electron');
27+
const { app, protocol, crashReporter, Menu } = require('electron');
2828

2929
// Enable portable support
3030
const portable = bootstrapNode.configurePortable(product);
@@ -43,6 +43,9 @@ const codeCachePath = getCodeCachePath();
4343
// Configure static command line arguments
4444
const argvConfig = configureCommandlineSwitchesSync(args);
4545

46+
// Disable default menu (https://github.com/electron/electron/issues/35512)
47+
Menu.setApplicationMenu(null);
48+
4649
// Configure crash reporter
4750
perf.mark('code/willStartCrashReporter');
4851
// If a crash-reporter-directory is specified we store the crash reports

0 commit comments

Comments
 (0)