neutralinojs / neutralino.js

JavaScript API for Neutralinojs

Home Page:https://neutralino.js.org/docs/api/overview

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Preventing white flash when starting up the window

wiredmatt opened this issue · comments

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.

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