mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-07-15 21:26:06 +00:00
Workaround for electron freeze bug
This commit is contained in:
@@ -172,12 +172,13 @@ function startSplashScreen() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
splashScreen.setIgnoreMouseEvents(true);
|
||||
//Removed as we want to be able to drag the splash screen: splashScreen.setIgnoreMouseEvents(true);
|
||||
|
||||
app.once('browser-window-created', () => {
|
||||
splashScreen.destroy();
|
||||
splashScreen = null;
|
||||
if (splashScreen) {
|
||||
splashScreen.hide();
|
||||
}
|
||||
//We cannot destroy the window here as this triggers an electron freeze bug (https://github.com/electron/electron/issues/29050)
|
||||
});
|
||||
|
||||
const loadSplashscreenUrl = path.join(__dirname, 'splashscreen', 'index.html') + '?imgPath=' + imageFile;
|
||||
@@ -271,6 +272,13 @@ function startSocketApiBridge(port) {
|
||||
}
|
||||
});
|
||||
|
||||
socket.on('splashscreen-destroy', () => {
|
||||
if(splashScreen) {
|
||||
splashScreen.destroy();
|
||||
splashScreen = null;
|
||||
}
|
||||
});
|
||||
|
||||
socket.on('register-app-open-url-event', (id) => {
|
||||
global['electronsocket'] = socket;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user