0

When my electron app starts after every restart not maximize while I set alwaysOnTop to be true and minimizable to be false.

I creating mainWindow like below:

var scl = 1;
mainWindow = new BrowserWindow(
{
 screen: electron.screen.getAllDisplays()[2],
 x:1920, 
 width: 1080*scl, 
 height: 1920*scl,
 fullscreen:true,
 minimizable:false,
 resizable:false,
 closable:false,
 alwaysOnTop:true,
 maximize:true
});

I also added it to shell:startup but when application starts up it remains minimize.

OS: Windows 10 Home 64

electron version:1.4.8

electron-builder: ^8.6.0

electron-prebuilt: ^1.4.8

Any Idea?

Jens Habegger
  • 5,266
  • 41
  • 57

1 Answers1

0

You should check your x value given during your BrowserWindow initialization. This value describes the offset from the upper left corner to the right, it is likely that your window is not minimized but instead pushed off the screen.

Jens Habegger
  • 5,266
  • 41
  • 57