From 87606c6a6b565f84782c7ec12a39277917ee866a Mon Sep 17 00:00:00 2001 From: Peter Simonyi Date: Sat, 16 May 2020 09:04:32 -0400 Subject: [PATCH] status: Pass scroll events to volume and brightness sliders Sliders can be operated by mouse scroll, but the mouse has to be over the slider control. Make the brightness and volume system menu entries forward scroll events to the sliders they contain so that scrolling anywhere on the menu item operates the slider. Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2795 --- js/ui/status/brightness.js | 4 +++- js/ui/status/volume.js | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/js/ui/status/brightness.js b/js/ui/status/brightness.js index 2d0fee49a..17247880f 100644 --- a/js/ui/status/brightness.js +++ b/js/ui/status/brightness.js @@ -48,7 +48,9 @@ class Indicator extends PanelMenu.SystemIndicator { this._item.connect('key-press-event', (actor, event) => { return this._slider.emit('key-press-event', event); }); - + this._item.connect('scroll-event', (actor, event) => { + return this._slider.emit('scroll-event', event); + }); } _sliderChanged() { diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js index e8a787c4d..64767b848 100644 --- a/js/ui/status/volume.js +++ b/js/ui/status/volume.js @@ -56,6 +56,9 @@ var StreamSlider = class { this.item.connect('key-press-event', (actor, event) => { return this._slider.emit('key-press-event', event); }); + this.item.connect('scroll-event', (actor, event) => { + return this._slider.emit('scroll-event', event); + }); this._stream = null; this._volumeCancellable = null;