From 417e35d7ad8372a4305bca06d43e49df6a786e9d Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 11 Jun 2025 08:50:37 +0200 Subject: [PATCH] Disable prefers reduced motion: fix windows crash on startup --- build/patches/Disable-prefers-reduced-motion.patch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build/patches/Disable-prefers-reduced-motion.patch b/build/patches/Disable-prefers-reduced-motion.patch index 60cfdad1..de833b9b 100644 --- a/build/patches/Disable-prefers-reduced-motion.patch +++ b/build/patches/Disable-prefers-reduced-motion.patch @@ -9,8 +9,8 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- ui/android/java/src/org/chromium/ui/gfx/Animation.java | 1 + ui/gfx/animation/animation_linux.cc | 1 + - ui/gfx/animation/animation_win.cc | 2 ++ - 3 files changed, 4 insertions(+) + ui/gfx/animation/animation_win.cc | 3 +++ + 3 files changed, 5 insertions(+) diff --git a/ui/android/java/src/org/chromium/ui/gfx/Animation.java b/ui/android/java/src/org/chromium/ui/gfx/Animation.java --- a/ui/android/java/src/org/chromium/ui/gfx/Animation.java @@ -45,10 +45,11 @@ diff --git a/ui/gfx/animation/animation_win.cc b/ui/gfx/animation/animation_win. BOOL result; // Get "Turn off all unnecessary animations" value. if (::SystemParametersInfo(SPI_GETCLIENTAREAANIMATION, 0, &result, 0)) { -@@ -27,6 +28,7 @@ bool Animation::ScrollAnimationsEnabledBySystem() { +@@ -27,6 +28,8 @@ bool Animation::ScrollAnimationsEnabledBySystem() { // static void Animation::UpdatePrefersReducedMotion() { ++ prefers_reduced_motion_ = false; + if ((true)) return; // prefers_reduced_motion_ should only be modified on the UI thread. // TODO(crbug.com/40611878): DCHECK this assertion once tests are