Skip to content

Conversation

@screem02
Copy link
Contributor

@screem02 screem02 commented Jan 5, 2026

Fixes visual laggy appearance of level animation in OSD when using touchpad gesture volume control, from #12760.

Need

The previous behavior forces 100ms LEVEL_ANIMATION_TIME transition for all level changes, even minuscule ones, causes extreme lag when using gestures.

Fix

  • For value changes less than 0.4 use new 'const LEVEL_ANIMATION_TIME_FAST' (set to 0), fast transitions.
  • Throttled osdWindowManager.show() call in similar fashion as in zoom control class, prevent event flooding.
  • Switched to CLUTTER_LINEAR from EASE_OUT_QUAD animation mode to make transition smooth and reduce jerk.
  • Update: For gesture volume change, use separate new level func and 'const LEVEL_ANIMATION_TIME_GESTURE' (set to 0) and use CLUTTER_LINEAR.

Note

  • Opened draft because very sudden large motions still show slight lag, maybe tune it further or add dynamic LEVEL_ANIMATION_TIME? this was happening because I forgot to pass the time args to a func
  • used 0.4 because I wanted brightness, that jumps by 0.4 on my system, to have the 100ms level animation and all below it 0ms. removed this, did not want magic numbers.

Thanks for reviewing.

Closes #12760

Fix jerky level animation for small value changes, if level value changes by less than 0.4 do it using new fast constant, set it to zero for now.

the 0.4 is kind of hardcoded as the I wanted the brightness (that jumps by 0.4 on my system) to have the 100ms level animation and all below it 0ms.
throttling OSD manager show function calls to prevent event flooding when using gestures for volume control, which too was contributing to some choppiness.
Updates Clutter animation to linear to make is smooth and lower burstiness of animation.
@clefebvre clefebvre changed the title Fix OSD level animation lag when using gesture volume control [Next] Fix OSD level animation lag when using gesture volume control Jan 7, 2026
@screem02
Copy link
Contributor Author

screem02 commented Jan 7, 2026

hey @mtwebster , sorry for the bother, but c8cb4ec is failing on mint22 build but the later commit is passing, also since I'm new can you check if the code is following good standards.
Thank you!

@screem02 screem02 marked this pull request as ready for review January 7, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Volume OSD is very laggy

1 participant