[vlc-commits] qml: avoid sending pause event when switching to the fullplayer from the miniplayer

Pierre Lamot git at videolan.org
Thu Aug 29 10:45:03 CEST 2019


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu Aug  1 15:00:18 2019 +0200| [6b3dbc6865545e1bae6ad9a7a186c61009146945] | committer: Jean-Baptiste Kempf

qml: avoid sending pause event when switching to the fullplayer from the miniplayer

Unhandled keys are sent to hotkeys from the miniplayer on key pressed. The
  album covers in the miniplayer acts like a button and perform the action on
  key released. Hence a hotkey event was sent when pressing space.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6b3dbc6865545e1bae6ad9a7a186c61009146945
---

 modules/gui/qt/qml/player/MiniPlayer.qml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/gui/qt/qml/player/MiniPlayer.qml b/modules/gui/qt/qml/player/MiniPlayer.qml
index 0e5c08cd8a..1f1f4be5f2 100644
--- a/modules/gui/qt/qml/player/MiniPlayer.qml
+++ b/modules/gui/qt/qml/player/MiniPlayer.qml
@@ -77,6 +77,11 @@ Utils.NavigableFocusScope {
                     onClicked: history.push(["player"], History.Go)
                 }
 
+                Keys.onPressed: {
+                    if (event.key === Qt.Key_Return || event.key === Qt.Key_Space) {
+                        event.accepted = true
+                    }
+                }
                 Keys.onReleased: {
                     if (!event.accepted && (event.key === Qt.Key_Return || event.key === Qt.Key_Space))
                         history.push(["player"], History.Go)



More information about the vlc-commits mailing list