File tree 1 file changed +9
-0
lines changed
arduino-ide-extension/src/electron-main/theia
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,20 @@ import { app } from 'electron';
3
3
import { fork } from 'child_process' ;
4
4
import { AddressInfo } from 'net' ;
5
5
import { ElectronSecurityToken } from '@theia/core/lib/electron-common/electron-token' ;
6
+ import { FrontendApplicationConfig } from '@theia/application-package/lib/application-props' ;
6
7
import { ElectronMainApplication as TheiaElectronMainApplication , TheiaBrowserWindowOptions } from '@theia/core/lib/electron-main/electron-main-application' ;
7
8
8
9
@injectable ( )
9
10
export class ElectronMainApplication extends TheiaElectronMainApplication {
10
11
12
+ async start ( config : FrontendApplicationConfig ) : Promise < void > {
13
+ // Explicitly set the app name to have better menu items on macOS. ("About", "Hide", and "Quit")
14
+ // See: https://github.com/electron-userland/electron-builder/issues/2468
15
+ // Regression in Theia: https://github.com/eclipse-theia/theia/issues/8701
16
+ app . on ( 'ready' , ( ) => app . setName ( config . applicationName ) ) ;
17
+ return super . start ( config ) ;
18
+ }
19
+
11
20
protected async getDefaultBrowserWindowOptions ( ) : Promise < TheiaBrowserWindowOptions > {
12
21
const options = await super . getDefaultBrowserWindowOptions ( ) ;
13
22
return {
You can’t perform that action at this time.
0 commit comments