Repository navigation
fix(tb): stop showing the muted icon when the default audio device is lost - #1775
Merged
eythaann merged 2 commits intoSep 4, 2026
Merged
Conversation
…ded yet `OnDefaultDeviceChanged` can arrive before the device it points at has been loaded into the manager, which happens routinely with bluetooth endpoints that are still being enumerated. In that case the `for_each` below cleared `is_default_multimedia` / `is_default_communications` on every device and set it on none, so the manager ended up reporting no default device at all until something else triggered a reload. Load the device first when the reported id is unknown, so the flags always land on a real device. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…vice `mediaStep` defaulted `muted` to `true` whenever no default device was found, so the toolbar rendered `IoVolumeMuteOutline` for it. That is the exact same icon used for a device the user actually muted, so a lost or not-yet-loaded output device is indistinguishable from a real mute, and the toolbar reports a mute that does not exist. Default to `false` instead: volume already defaults to 0, which renders the distinct "no output" icon. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Author
|
Friendly ping on this one. It has been open since Aug 28 with no conflicts ( The fix is in two parts: Reproducible on 2.8.2 by power-cycling a Bluetooth speaker: audio comes back, the toolbar icon stays muted until Happy to rebase, split it into two commits, or adjust the approach if you would rather handle the missing-device case elsewhere. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The toolbar volume icon shows the muted icon while the default output device is playing
audio normally. Windows reports the device as default, unmuted and at 100%, but
@seelen/tb-media-popupkeeps drawingIoVolumeMuteOutlineuntil Seelen UI is restarted.Reproduced on 2.8.2 (Windows 11 26200, bluetooth speaker):
disappears and comes back.
seelen-uiis the only way to recover it.Root cause
Two separate bugs that compound each other.
1.
DefaultDeviceChangedcan clear every default flag.IMMNotificationClient::OnDefaultDeviceChangedcan report a device thatDevicesManagerhasnot loaded yet, which happens routinely with bluetooth endpoints that are still being
enumerated. The handler then walks the map comparing ids:
Nothing matches, so the flag is cleared on every device and set on none. From that point on
the manager reports no default device at all.
2. "no default device" is rendered as "muted".
mediaStepdefaultsmutedtotruewhen there is no default device:and the plugin template starts with
return isMuted ? icon("IoVolumeMuteOutline") : ..., so adevice the user actually muted and a device the manager has lost are drawn with the exact same
icon. The toolbar reports a mute that does not exist.
Fix
application.rs: when the reported default id is not in the map, load that device first, sothe flags always land on a real device.
scopes.svelte.ts: defaultmutedtofalse.volumealready defaults to0, whichrenders the distinct "no output" icon, so the two states stay visually different.
Both
isMutedandinputIsMutedare changed for consistency.Notes
This may also be the underlying cause of #1590 ("nothing in the toolbox when I connect to my
bluetooth headset"): once no device is flagged as default,
defaultOutputisundefinedandthe media popup has nothing to render.
I could not build locally (no Rust toolchain on the machine where this was diagnosed), so the
Rust change is written against
masterand relies on CI forcargo fmt/clippy/test. Theanalysis and the reproduction above are from a running 2.8.2 install.