start mode is changed

This commit is contained in:
richard-loafle 2020-02-06 18:24:02 +09:00
parent 77ae813584
commit cffe62986e

View File

@ -58,7 +58,7 @@ export class AppWindow {
}, },
acceptFirstMouse: true, acceptFirstMouse: true,
icon: this.appIconPath, icon: this.appIconPath,
show: !appStorage.startupHideWindow show: false
}; };
if (__DARWIN__) { if (__DARWIN__) {
@ -120,6 +120,9 @@ export class AppWindow {
// can be tidied up once https://github.com/electron/electron/issues/12971 // can be tidied up once https://github.com/electron/electron/issues/12971
// has been confirmed as resolved // has been confirmed as resolved
this.window.once(ElectronBrowserWindowChannel.ReadyToShow, () => { this.window.once(ElectronBrowserWindowChannel.ReadyToShow, () => {
if (!appStorage.startupHideWindow) {
this.window.show();
}
this.window.on(ElectronBrowserWindowChannel.Unmaximize, () => { this.window.on(ElectronBrowserWindowChannel.Unmaximize, () => {
setTimeout(() => { setTimeout(() => {
const bounds = this.window.getBounds(); const bounds = this.window.getBounds();