volume: Cancel before checking state
Since commit 2894085c45
we omit sound feedback on volume changes
if something is already outputting sound. Unfortunately that
"something" may be our own feedback (from a previous volume
change).
In that case we do not want to omit the new feedback, so instead
cancel the previous one.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1147
This commit is contained in:
parent
ba8210ea98
commit
97fe4f761a
@ -138,11 +138,12 @@ var StreamSlider = class {
|
||||
}
|
||||
|
||||
_notifyVolumeChange() {
|
||||
if (this._stream.state === Gvc.MixerStreamState.RUNNING)
|
||||
return; // feedback not necessary while playing
|
||||
|
||||
if (this._volumeCancellable)
|
||||
this._volumeCancellable.cancel();
|
||||
this._volumeCancellable = null;
|
||||
|
||||
if (this._stream.state === Gvc.MixerStreamState.RUNNING)
|
||||
return; // feedback not necessary while playing
|
||||
|
||||
this._volumeCancellable = new Gio.Cancellable();
|
||||
let player = global.display.get_sound_player();
|
||||
|
Loading…
Reference in New Issue
Block a user