Skip to content

StScrollBar trough paging animation doesn't respect animations-enabled setting #13849

Description

@sporteka2

StScrollBar trough paging animation doesn't respect animations-enabled setting

Cinnamon version: 6.6.7

Problem

When animations are disabled in System Settings → Effects (which sets org.cinnamon.desktop-effects-workspace to false), most UI animations are correctly suppressed. However, clicking on the scrollbar trough (the empty area above/below the handle) still animates smoothly when paging, because StScrollBar's trough paging animation in C code does not check StSettings.animations-enabled.

Many users intentionally disable animations system-wide (for accessibility, reduced motion preference, performance, or personal preference) and expect consistent behavior:

Action Animates when disabled?
Window map/close effects ❌ Correctly off
Workspace switching ❌ Correctly off
JS popup menus ❌ Correctly off
Scrollbar trough click paging ✅ Still animates (unexpected)

Steps to reproduce

  1. Go to System Settings → Effects
  2. Disable "Desktop and window effects" (or set org.cinnamon.desktop-effects-workspace to false)
  3. Open the main menu and click on the empty area of the applications list scrollbar
  4. Observe that the scroll still animates with easing curve

Root cause

In src/st/st-scroll-bar.c, function trough_paging_cb (around line 430), the code reads slow-down-factor from StSettings but never checks animations-enabled:

settings = st_settings_get ();
g_object_get (settings, "slow-down-factor", &slow_down_factor, NULL);

/* FIXME: Creating a new transition for each scroll... */
transition = g_object_new (CLUTTER_TYPE_PROPERTY_TRANSITION,
                           "property-name", "value",
                           "interval", clutter_interval_new (G_TYPE_DOUBLE, value, new_value),
                           "duration", (guint)(PAGING_SUBSEQUENT_REPEAT_TIMEOUT * slow_down_factor),
                           "progress-mode", mode,
                           "remove-on-complete", TRUE,
                           NULL);
st_adjustment_add_transition (priv->adjustment, "value", transition);

Meanwhile, animations-enabled is properly set on StSettings in js/ui/main.js:

function updateAnimationsEnabled() {
    let settings_enabled = global.settings.get_boolean("desktop-effects-workspace");
    animations_enabled = (!software_rendering) && settings_enabled;
    St.Settings.get().animations_enabled = animations_enabled;
}

The JS layer consistently respects this flag via adjustAnimationTime(), but the C-level scroll bar never checks it.

Proposed fix

In trough_paging_cb in st-scroll-bar.c, before creating the transition, check if animations are enabled. If not, use st_adjustment_set_value() directly instead:

settings = st_settings_get ();
g_object_get (settings,
              "slow-down-factor", &slow_down_factor,
              "animations-enabled", &animations_enabled,
              NULL);

if (!animations_enabled) {
    st_adjustment_set_value (priv->adjustment, new_value);
    return ret;
}

This would also make the behavior consistent with other scroll actions:

  • Handle dragging → set_value() (no animation)
  • Mouse wheel → set_value() (no animation)
  • Trough click with animations off → set_value() (no animation — currently broken)
  • Trough click with animations on → animated transition (unchanged)

Additional context

  • The trough_paging_cb function internally uses CLUTTER_EASE_OUT_CUBIC, CLUTTER_EASE_IN_CUBIC, and CLUTTER_LINEAR easing modes depending on the phase (first press, repeated press, sustained hold).
  • The scroll-start and scroll-stop signals are still emitted correctly during trough paging.
  • This affects all StScrollBar instances in Cinnamon (menu, popup menus, notifications, etc.), not just the main menu.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions