Commit a8005e3c authored by Florian Müllner's avatar Florian Müllner

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.

parent 6c8eb1a1
......@@ -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.value = Math.max(0, Math.min(this._value + delta, this._maxValue));
return Clutter.EVENT_STOP;
return Clutter.EVENT_PROPAGATE;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment