Skip to content

Commit

Permalink
perf - disable electron from setting a default menu (#159660)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero authored Aug 31, 2022
1 parent b358daf commit 963bd98
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const { getUserDataPath } = require('./vs/platform/environment/node/userDataPath
const { stripComments } = require('./vs/base/common/stripComments');
/** @type {Partial<IProductConfiguration>} */
const product = require('../product.json');
const { app, protocol, crashReporter } = require('electron');
const { app, protocol, crashReporter, Menu } = require('electron');

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

// Disable default menu (https://github.com/electron/electron/issues/35512)
Menu.setApplicationMenu(null);

// Configure crash reporter
perf.mark('code/willStartCrashReporter');
// If a crash-reporter-directory is specified we store the crash reports
Expand Down

0 comments on commit 963bd98

Please sign in to comment.