Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf - disable electron from setting a default menu #159660

Merged
merged 1 commit into from
Aug 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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