From aedd67ef4b1ff707ba82499ebca3f7897674a176 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 30 May 2023 13:47:15 +0300 Subject: [PATCH] plugins/eyeonscreen: Animate towards window's screen's center This looks better on multi screen setups. --- src/plugins/eyeonscreen/package/contents/code/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/eyeonscreen/package/contents/code/main.js b/src/plugins/eyeonscreen/package/contents/code/main.js index 7263029be3..7758e6f2de 100644 --- a/src/plugins/eyeonscreen/package/contents/code/main.js +++ b/src/plugins/eyeonscreen/package/contents/code/main.js @@ -17,14 +17,14 @@ var eyeOnScreenEffect = { }, slurp: function (showing) { var stackingOrder = effects.stackingOrder; - var screenGeo = effects.virtualScreenGeometry; - var center = { value1: screenGeo.x + screenGeo.width/2, - value2: screenGeo.y + screenGeo.height/2 }; for (var i = 0; i < stackingOrder.length; ++i) { var w = stackingOrder[i]; if (!w.visible || !(showing || w.slurpedByEyeOnScreen)) { continue; } + const screenGeo = w.screen.geometry; + const center = { value1: screenGeo.x + screenGeo.width / 2, + value2: screenGeo.y + screenGeo.height / 2 }; w.slurpedByEyeOnScreen = showing; if (w.desktopWindow) { // causes "seizures" because of opposing movements