Skip to content

Commit

Permalink
Fixed a bug in the preview window
Browse files Browse the repository at this point in the history
  • Loading branch information
OrangeJedi committed Mar 10, 2023
1 parent 630801e commit c2b2900
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 6 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ function createSSPWindow(argv) {
},
frame: true,
transparent: true,
icon: path.join(__dirname, 'icon.ico')
icon: path.join(__dirname, 'icon.ico'),
show: false
});
win.loadFile('web/screensaver.html');
win.on('closed', function () {
Expand All @@ -181,7 +182,10 @@ function createSSPWindow(argv) {
win = null;
preview = false;
});
win.webContents.send('screenNumber', 0);
win.once('ready-to-show', () => {
win.webContents.send('screenNumber', 0);
win.show();
})
if (argv) {
if (argv.includes("/dt")) {
win.webContents.openDevTools();
Expand Down
1 change: 0 additions & 1 deletion web/screensaver.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ function fadeVideoIn(time) {
randomDirection = true;
transitionSettings.direction = transitionDirections[transitionSettings.type][randomInt(0, transitionDirections[transitionSettings.type].length)];
}
console.log(transitionSettings);
}
if (time > 0) {
transitionTimeout = setTimeout(fadeVideoIn, 16, time - 16);
Expand Down

0 comments on commit c2b2900

Please sign in to comment.