Reset bgColor (#1262)

* Reset bgColor

* remove unused

* add precisions comments
This commit is contained in:
Philippe Potvin 2016-12-19 11:17:26 -05:00 committed by Guillermo Rauch
parent 5d1533c31d
commit ef5caeeb09

View file

@ -174,13 +174,13 @@ app.on('ready', () => installDevExtensions(isDev).then(() => {
}
// update background color if necessary
win.setBackgroundColor(toElectronBackgroundColor(cfg_.backgroundColor || '#000'));
cfg = cfg_;
});
rpc.on('init', () => {
win.show();
// we update the backgroundColor once the init is called.
// when we do a win.reload() we need need to reset the backgroundColor
win.setBackgroundColor(toElectronBackgroundColor(cfg.backgroundColor || '#000'));
// If no callback is passed to createWindow,
// a new session will be created by default.