Skip to content

Commit

Permalink
Merge pull request #49 from syncpoint/issue/48
Browse files Browse the repository at this point in the history
#48 fixed issue with (now) missing event data.
  • Loading branch information
ThomasHalwax authored Jun 5, 2024
2 parents 884e5b2 + b26b921 commit 9ae152e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/WindowManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ WindowManager.prototype.createWindow = function (options) {
})

this.windows[window.id] = handle
const webContents = window.webContents

window.once('close', () => {
delete this.windows[window.id]
Expand All @@ -93,12 +94,12 @@ WindowManager.prototype.createWindow = function (options) {
// See: https://www.electronjs.org/docs/api/browser-window#event-page-title-updated
window.on('page-title-updated', event => event.preventDefault())

window.on('enter-full-screen', ({ sender }) => {
sender.webContents.send('IPC_ENTER_FULLSCREEN')
window.on('enter-full-screen', () => {
webContents.send('IPC_ENTER_FULLSCREEN')
})

window.on('leave-full-screen', ({ sender }) => {
sender.webContents.send('IPC_LEAVE_FULLSCREEN')
window.on('leave-full-screen', () => {
webContents.send('IPC_LEAVE_FULLSCREEN')
})

window.on('focus', () => {
Expand Down

0 comments on commit 9ae152e

Please sign in to comment.