linuxmint / linuxmint/cinnamon

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

Open Beginner friendly
#13,849 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
5.6k
Forks
915
Avg merge
5d 22h
Merged PRs (30d)
3

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/st/st-scroll-bar.c at trough_paging_cb and compare the animations-enabled handling in js/ui/main.js. Verify the scrollbar uses direct value changes when animations are disabled while preserving the existing animated transition when they are enabled; confirm scroll-start and scroll-stop behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, javascript
Domain
accessibility, desktop
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
82/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.