From 3c74b8ec383a312783b22407b6c8303b41f24b20 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Sun, 11 Mar 2018 20:05:48 +0100 Subject: [PATCH] possible fix to docking (fixes #9, fixes #18) --- app/main.js | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/app/main.js b/app/main.js index 5814d998..8094ca61 100644 --- a/app/main.js +++ b/app/main.js @@ -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) => {