Skip to content

effects/slide: add special case for instant animations

As documented in BUG 427901, the slide effect is broken when animations are disabled globally.

I wasn't sure what the best way to fix these float issues was, but figured this is a pretty reasonable workaround, as it more-or-less matches what you expect an infinitely strong spring to do.

On my local machine it seems to work okay, although on-the-fly enabling/disabling of animations does not (but this seems an issue with my setup and not this patch, as no animations whatsoever are affected).

Probably also a candidate for backporting to Plasma 5?

--

In springmotion.cpp for the slide plugin, there are issues when animations are disabled, namely a black screen flicker.

The flicker is caused by float under/overflow (div-by-0 -> infinity).

This commit fixes that by special-casing an infinite spring constant, so that the animation immediately jumps to the anchor.

BUG: 472901

Edited by Quinten Kock

Merge request reports