diff --git a/app/ui/window.js b/app/ui/window.js index caf6d29c..0e144cc0 100644 --- a/app/ui/window.js +++ b/app/ui/window.js @@ -217,8 +217,9 @@ module.exports = class Window { for (const ev of ['maximize', 'unmaximize', 'minimize', 'restore']) { window.on(ev, () => rpc.emit('windowGeometry change')); } - rpc.win.on('move', () => { - rpc.emit('move'); + window.on('move', () => { + const position = window.getPosition(); + rpc.emit('move', {bounds: {x: position[0], y: position[1]}}); }); rpc.on('close', () => { window.close(); diff --git a/lib/actions/ui.js b/lib/actions/ui.js index ec5b24d6..6e3ac9e2 100644 --- a/lib/actions/ui.js +++ b/lib/actions/ui.js @@ -229,10 +229,11 @@ export function moveTo(i) { }; } -export function windowMove() { +export function windowMove(window) { return dispatch => { dispatch({ type: UI_WINDOW_MOVE, + window, effect() { dispatch(setFontSmoothing()); } diff --git a/lib/index.js b/lib/index.js index 5542b3a3..6bbcdb47 100644 --- a/lib/index.js +++ b/lib/index.js @@ -162,8 +162,8 @@ rpc.on('update available', ({releaseName, releaseNotes, releaseUrl, canInstall}) store_.dispatch(updaterActions.updateAvailable(releaseName, releaseNotes, releaseUrl, canInstall)); }); -rpc.on('move', () => { - store_.dispatch(uiActions.windowMove()); +rpc.on('move', window => { + store_.dispatch(uiActions.windowMove(window)); }); rpc.on('windowGeometry change', () => {