[gnome-shell/wip/fmuellner/volume-change-feedback: 4/6] slider: Stop emulating drags in key handling
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/volume-change-feedback: 4/6] slider: Stop emulating drags in key handling
- Date: Sat, 23 Nov 2019 14:17:58 +0000 (UTC)
commit a8005e3c3072723af1f5a7ec39f1aad430745900
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Feb 26 20:57:10 2018 +0100
slider: Stop emulating drags in key handling
Emitting ::drag-end after changing the slider value via arrow keys
was a cheap way to make the sound feedback work for keyboard input.
But now that the volume indicator plays the sound on ::value-changed
as well, we can stop doing that - after all, key presses aren't drags.
Besides that, this will make the limiting of feedback to actual volume
changes from the previous commit work for key events as well.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/53
js/ui/slider.js | 2 --
1 file changed, 2 deletions(-)
---
diff --git a/js/ui/slider.js b/js/ui/slider.js
index a6d710d21b..824cf87555 100644
--- a/js/ui/slider.js
+++ b/js/ui/slider.js
@@ -181,9 +181,7 @@ var Slider = GObject.registerClass({
let key = keyPressEvent.keyval;
if (key == Clutter.KEY_Right || key == Clutter.KEY_Left) {
let delta = key == Clutter.KEY_Right ? 0.1 : -0.1;
- this.emit('drag-begin');
this.value = Math.max(0, Math.min(this._value + delta, this._maxValue));
- this.emit('drag-end');
return Clutter.EVENT_STOP;
}
return Clutter.EVENT_PROPAGATE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]