fix: electron upgrade fixes (#2058)
* fix: electron upgrade fixes * fix: electron remote * fixes * fixes * pin * actually
This commit is contained in:
committed by
GitHub
parent
0732bd93d2
commit
c36e43eaa3
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user