Skip to content

Issue #6757: Use Windows/MacOS settings for gtk-enable-animations

This patch attempts to resolve #6757, which deals with gtk-enable-animations not using Windows and MacOS settings for enabling animations.

@lb90 pointed me to the files where gtk-* properties are read from Windows and MacOS, and I ported the code we used to read these values in GIMP:

  • Windows: SystemParametersInfo (SPI_GETCLIENTAREAANIMATION, 0, &val, 0);
  • MacOS: setting = [[NSWorkspace sharedWorkspace] accessibilityDisplayShouldReduceMotion];

I can confirm that the Windows code works in Windows 10 - I removed the equivalent code in GIMP and the animation display was still shown/hidden correctly. I do not have access to MacOS to test, but the code matches how WebKit reads this value: https://github.com/WebKit/webkit/blob/main/Source/WebCore/platform/mac/ThemeMac.mm#L441

Let me know if I need to provide any additional information or make any other changes. Thanks!

Merge request reports