From 4596492cd953034f11fc776031521c2ccc4f5cd7 Mon Sep 17 00:00:00 2001 From: Brendan Date: Wed, 17 Feb 2021 02:07:42 -0500 Subject: [PATCH 1/3] 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. --- ElectronNET.Host/main.js | 7 +++---- ElectronNET.Host/splashscreen/index.html | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ElectronNET.Host/main.js b/ElectronNET.Host/main.js index 163cd1e3..e52ef412 100644 --- a/ElectronNET.Host/main.js +++ b/ElectronNET.Host/main.js @@ -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; diff --git a/ElectronNET.Host/splashscreen/index.html b/ElectronNET.Host/splashscreen/index.html index f434344d..ddd85e22 100644 --- a/ElectronNET.Host/splashscreen/index.html +++ b/ElectronNET.Host/splashscreen/index.html @@ -1,4 +1,4 @@ - + @@ -15,7 +15,7 @@ } - splashscreen + splashscreen