summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@gnome.org>2018-02-26 20:57:10 +0100
committerJonas Ådahl <jadahl@gmail.com>2018-04-16 13:28:05 +0000
commit684327137981514b8dd33f4b513cbd4185b48a10 (patch)
tree9497982476ca7fc8c2fc4bffe9ac50910188f0ac
parent5405a16de9cf2241fc7a261f703de550cf3028fa (diff)
downloadgnome-shell-wip/fmuellner/volume-change-feedback.tar.gz
slider: Stop emulating drags in key handlingwip/fmuellner/volume-change-feedback
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
-rw-r--r--js/ui/slider.js2
1 files changed, 0 insertions, 2 deletions
diff --git a/js/ui/slider.js b/js/ui/slider.js
index 9853929eb..30295b455 100644
--- a/js/ui/slider.js
+++ b/js/ui/slider.js
@@ -232,9 +232,7 @@ var Slider = new Lang.Class({
let delta = key == Clutter.KEY_Right ? 0.1 : -0.1;
this._value = Math.max(0, Math.min(this._value + delta, 1));
this.actor.queue_repaint();
- this.emit('drag-begin');
this.emit('value-changed', this._value);
- this.emit('drag-end');
return Clutter.EVENT_STOP;
}
return Clutter.EVENT_PROPAGATE;