Skip to content

Commit

Permalink
possible fix to docking (fixes #9, fixes #18)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Mar 11, 2018
1 parent 9d7bf2a commit 3c74b8e
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,7 @@ setupWindowManagement = () => {
})

electron.ipcMain.on('window-set-bounds', (event, bounds) => {
let actualBounds = app.window.getBounds()
actualBounds.width -= bounds.x - actualBounds.x
actualBounds.height -= bounds.y - actualBounds.y
actualBounds.x = bounds.x
actualBounds.y = bounds.y
app.window.setBounds(actualBounds)
setTimeout(() => {
actualBounds = app.window.getBounds()
bounds.width += bounds.x - actualBounds.x
bounds.height += bounds.y - actualBounds.y
bounds.x = actualBounds.x
bounds.y = actualBounds.y
app.window.setBounds(bounds)
}, 100)
app.window.setBounds(bounds)
})

electron.ipcMain.on('window-set-always-on-top', (event, flag) => {
Expand Down

1 comment on commit 3c74b8e

@Darwinrv94
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File main.js not exist windows???

Please sign in to comment.