Forward webview visibility change events from browser process
This commit is contained in:
parent
7564a9973b
commit
1d84d83fd4
4 changed files with 16 additions and 10 deletions
|
@ -110,7 +110,9 @@ BrowserWindow.prototype._init = function () {
|
|||
const newState = this.isVisible() && !this.isMinimized()
|
||||
if (isVisible !== newState) {
|
||||
isVisible = newState
|
||||
this.webContents.send('ELECTRON_RENDERER_WINDOW_VISIBILITY_CHANGE', isVisible ? 'visible' : 'hidden')
|
||||
const visibilityState = isVisible ? 'visible' : 'hidden'
|
||||
this.webContents.send('ELECTRON_RENDERER_WINDOW_VISIBILITY_CHANGE', visibilityState)
|
||||
this.webContents.emit('-window-visibility-change', visibilityState)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue