Fix splash screen interaction causing crashes, fix splash screen content ghost drag, fix resizable splash screen. Resolves #539, #357

Using the browser-window-focus event would cause the splashScreen to be destroyed early (since regular mouse-focus events would cause the event to be fired).

Using the browser-window-created event produces the correct behavior.
This commit is contained in:
Brendan
2021-02-17 02:07:42 -05:00
parent 30941df39c
commit 4596492cd9
2 changed files with 5 additions and 6 deletions

View File

@@ -121,14 +121,13 @@ function startSplashScreen() {
center: true,
frame: false,
closable: false,
resizable: false,
skipTaskbar: true,
show: true
});
app.once('browser-window-focus', () => {
app.once('browser-window-focus', () => {
splashScreen.destroy();
});
app.once('browser-window-created', () => {
splashScreen.destroy();
});
const loadSplashscreenUrl = path.join(__dirname, 'splashscreen', 'index.html') + '?imgPath=' + imageFile;

View File

@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<head>
@@ -15,7 +15,7 @@
}
</style>
<img alt="splashscreen" style="width: 100%; height: 100%;">
<img draggable="false" alt="splashscreen" style="width: 100%; height: 100%;">
<script>
(() => {