diff --git a/src/main/common/listener.js b/src/main/common/listener.js index 7c20953..c86e5cf 100644 --- a/src/main/common/listener.js +++ b/src/main/common/listener.js @@ -85,7 +85,13 @@ class Listener { init(mainWindow) { this.fn = throttle(({x, y}, picker) => { - const img = robot.screen.capture(parseInt(x) - 5, parseInt(y) - 5, 9, 9); + const { scaleFactor } = screen.getDisplayNearestPoint({x, y}); + const img = robot.screen.capture( + x - parseInt(5 / scaleFactor), + y - parseInt(5 / scaleFactor), + 10, + 10 + ); const colors = {}