@@ -1144,8 +1144,15 @@ class CinnamonSoundApplet extends Applet.TextIconApplet {
11441144 }
11451145
11461146 _onScrollEvent ( actor , event ) {
1147- let direction = event . get_scroll_direction ( ) ;
1147+ const direction = event . get_scroll_direction ( ) ;
1148+
1149+ if ( direction == Clutter . ScrollDirection . SMOOTH ) {
1150+ return Clutter . EVENT_PROPAGATE ;
1151+ }
1152+
11481153 let currentVolume = this . _output . volume ;
1154+ let volumeChange = false ;
1155+ let player = this . _players [ this . _activePlayer ] ;
11491156
11501157 if ( direction == Clutter . ScrollDirection . DOWN ) {
11511158 let prev_muted = this . _output . is_muted ;
@@ -1159,29 +1166,33 @@ class CinnamonSoundApplet extends Applet.TextIconApplet {
11591166 if ( this . _output . volume != this . _volumeNorm && this . _output . volume > this . _volumeNorm * ( 1 - VOLUME_ADJUSTMENT_STEP / 2 ) && this . _output . volume < this . _volumeNorm * ( 1 + VOLUME_ADJUSTMENT_STEP / 2 ) )
11601167 this . _output . volume = this . _volumeNorm ;
11611168 }
1162- this . _output . push_volume ( ) ;
1169+
1170+ volumeChange = true ;
11631171 }
11641172 else if ( direction == Clutter . ScrollDirection . UP ) {
11651173 this . _output . volume = Math . min ( this . _volumeMax , currentVolume + this . _volumeNorm * VOLUME_ADJUSTMENT_STEP ) ;
11661174 // 100% is magnetic:
11671175 if ( this . _output . volume != this . _volumeNorm && this . _output . volume > this . _volumeNorm * ( 1 - VOLUME_ADJUSTMENT_STEP / 2 ) && this . _output . volume < this . _volumeNorm * ( 1 + VOLUME_ADJUSTMENT_STEP / 2 ) )
11681176 this . _output . volume = this . _volumeNorm ;
1169- this . _output . push_volume ( ) ;
1177+
11701178 this . _output . change_is_muted ( false ) ;
1179+ volumeChange = true ;
11711180 }
1172- else if ( this . horizontalScroll ) {
1181+ else if ( this . horizontalScroll && player !== null && player . _playerStatus !== "Stopped" ) {
11731182 if ( direction == Clutter . ScrollDirection . LEFT ) {
11741183 this . _players [ this . _activePlayer ] . _mediaServerPlayer . PreviousRemote ( ) ;
11751184 }
1176- else {
1185+ else if ( direction == Clutter . ScrollDirection . RIGHT ) {
11771186 this . _players [ this . _activePlayer ] . _mediaServerPlayer . NextRemote ( ) ;
11781187 }
11791188 }
11801189
1181- this . _applet_tooltip . show ( ) ;
1182-
1183- if ( event . get_scroll_direction ( ) != Clutter . ScrollDirection . SMOOTH ) {
1190+ if ( volumeChange ) {
1191+ this . _output . push_volume ( ) ;
11841192 this . _notifyVolumeChange ( this . _output ) ;
1193+ this . _applet_tooltip . show ( ) ;
1194+ } else {
1195+ this . _applet_tooltip . hide ( ) ;
11851196 }
11861197 }
11871198
0 commit comments