[Feature Request]: allow BrowserWindow
to be created maximized
or fullscreen
#34368
Open
3 tasks done
Preflight Checklist
Problem Description
You cannot pass options to a window to open it maximized or fullscreen, so you have to call
maximize
orsetFullscreen
after the window is already opened. This results in an ugly flicker as demonstrated below:I am aware of the
ready-to-show
event, but that event is not even recommended for very large apps (such as VS Code).As a workaround we currently set
show: false
and then callwindow.maximize
andwindow.show
. But we would like to drop this workaround.Proposed Solution
The
BrowserWindow
constructor allows to pass in an option that the window is either maximized or fullscreen when being created.Alternatives Considered
Hiding the window on creation is our current workaround but it is brittle, as #32949 (comment) shows.
Additional Information
main.js
code:The text was updated successfully, but these errors were encountered: