max_sink_volume and max_source_volume were only computed in the TogglePopup handler, so they kept their Default value of 0 until the popup had been opened once. The scroll-to-adjust handler clamps against max_sink_volume, which meant every wheel event resolved to SetSinkVolume(0) until the user had clicked the applet icon: scrolling up did nothing and scrolling down muted the sink. Extract refresh_volume_limits() and call it from init() as well as from TogglePopup, so the popup still picks up amplification config changes made during the session. This is the actual cause of "scroll does not adjust volume until the applet is clicked once" — the wheel events were reaching the widget all along, which is why a single click made scrolling work on plain hover from then on. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| data | ||
| i18n | ||
| src | ||
| Cargo.toml | ||
| i18n.toml | ||