mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
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
1 changed files with 4 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue