fix: electron upgrade fixes (#2058)

* fix: electron upgrade fixes

* fix: electron remote

* fixes

* fixes

* pin

* actually
This commit is contained in:
Diego Rodríguez Baquero
2021-10-10 13:21:45 -05:00
committed by GitHub
parent 0732bd93d2
commit c36e43eaa3
12 changed files with 1152 additions and 721 deletions

View File

@@ -50,6 +50,7 @@ function init (state, options) {
x: initialBounds.x,
y: initialBounds.y
})
require('@electron/remote/main').enable(win.webContents)
win.loadURL(config.WINDOW_MAIN)
@@ -65,7 +66,7 @@ function init (state, options) {
menu.onToggleFullScreen(main.win.isFullScreen())
})
win.webContents.on('will-navigate', (e, url) => {
win.webContents.on('will-navigate', (e) => {
// Prevent drag-and-drop from navigating the Electron window, which can happen
// before our drag-and-drop handlers have been initialized.
e.preventDefault()
@@ -151,7 +152,7 @@ function setBounds (bounds, maximize) {
log('setBounds: maximizing')
main.win.maximize()
} else if (maximize === false && main.win.isMaximized()) {
log('setBounds: unmaximizing')
log('setBounds: minimizing')
main.win.unmaximize()
}