Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preventing white flash when starting up the window #109

Open
wiredmatt opened this issue Apr 24, 2024 · 1 comment
Open

Preventing white flash when starting up the window #109

wiredmatt opened this issue Apr 24, 2024 · 1 comment

Comments

@wiredmatt
Copy link

Hey! I'm the opposite of a complete fan when it comes to white flashes as you open up software, is there a way to achieve something similar to this?

Things I tried:

  1. Using CSS to set the background color of the body, and while that helps (slightly), the white flash is still there on startup.
  2. Setting "hidden": true in neutralino.config.json, but it seems you can't show a hidden application for some reason? (Binding the ready event to just to do Neutralino.window.show() -or any other- doesn't do anything, if this worked it'd solve my issue)

I was thinking maybe the "main" process can start hidden (specified the config file), and then you programatically create the actual user-facing window (in the background, somehow?) and show it after it's done rendering the black background (probably a timeout is enough) as per this https://neutralino.js.org/docs/api/window#windowcreateurl-windowoptions

Maybe also starting the window transparent and borderless and then disabling the transparency, with timeout as well.

Anyway a little bit lost here! Would appreciate more configuration options for the window / overridable window creation event.

@wiredmatt
Copy link
Author

Setting "transparent: true" helps, no white flash at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant