🪲 Fix shatter-from-pointer-when-openeing-windows

This commit is contained in:
Simon Schneegans
2022-03-31 21:07:33 +02:00
parent a166072168
commit 7d0a75cd59
+4 -1
View File
@@ -142,12 +142,15 @@ if (utils.isInShellProcess()) {
let epicenterY = 0.5; let epicenterY = 0.5;
// However, if this option is set, we use the mouse pointer position. // However, if this option is set, we use the mouse pointer position.
if (settings.get_boolean('broken-glass-use-pointer')) { if (!forOpening && settings.get_boolean('broken-glass-use-pointer')) {
const [x, y] = global.get_pointer(); const [x, y] = global.get_pointer();
const [ok, localX, localY] = actor.transform_stage_point(x, y); const [ok, localX, localY] = actor.transform_stage_point(x, y);
if (ok) {
epicenterX = localX / actor.width; epicenterX = localX / actor.width;
epicenterY = localY / actor.height; epicenterY = localY / actor.height;
} }
}
// If we are currently performing integration test, the animation uses a fixed seed. // If we are currently performing integration test, the animation uses a fixed seed.
const testMode = settings.get_boolean('test-mode'); const testMode = settings.get_boolean('test-mode');