Electron: enableLargerThanScreen option doesn't work

Created on 28 Mar 2016  路  3Comments  路  Source: electron/electron

  • Electron version: 0.37.2
  • Operating system: Windows 10 64bit

Try to create BrowserWindow with current desktop resolution (ex. in my case it's 1920x1080) or greater than the current desktop resolutin. The window's size is 1920x1040 (40px is probably the taskbar space). Changing enableLargerThanScreen to true, max width/height to current resolution or greater does nothing.

My BrowserWindow creator: (I want to create transparent fullscreen borderless window - fullscreen overlay)
capture = new BrowserWindow({ enableLargerThanScreen: true, x: 0, y: 0, width: 1920, height: 1080, frame: false, transparent: true, resizable: false, maxHeight: 1080, maxWidth: 1920, 'skip-taskbar': true, alwaysOnTop: true, hasShadow: false });

Most helpful comment

I understand the problem now, on Windows there is a platform limitation that you can not create a window larger than the display, but you can resize the window to any size you want. So passing the window size to BrowserWindow won't work, but you can call setSize instead:

capture.setSize(1920, 1080);

All 3 comments

What do you mean by "doesn't work"?

As the documentation says, the enableLargerThanScreen option should "Enable the window to be resized larger than screen". It doesn't work for me (I was trying to create window larger than my screen resolution with more than 1920px in width and more than 1080px in height) and the result was only a 1920x1040px window.

I understand the problem now, on Windows there is a platform limitation that you can not create a window larger than the display, but you can resize the window to any size you want. So passing the window size to BrowserWindow won't work, but you can call setSize instead:

capture.setSize(1920, 1080);
Was this page helpful?
0 / 5 - 0 ratings

Related issues

ThorstenHans picture ThorstenHans  路  3Comments

etiktin picture etiktin  路  3Comments

reggi picture reggi  路  3Comments

DanielDignam picture DanielDignam  路  3Comments

sindresorhus picture sindresorhus  路  3Comments