[vlc-devel] [PATCH 3/4] qml: player, don't forward accepted key events to the hotkeys
Pierre Lamot
pierre at videolabs.io
Tue Jul 30 12:39:17 CEST 2019
On 2019-07-30 11:37, Alexandre Janniaux wrote:
> Hi,
>
> A comment in the code to explain the return might help as it's the
> reciprocal
> form of the comment above in the second chunk, but maybe not mandatory
> as is
> it probably a common pattern for event filters in QML.
Accepted events have already been handled before. This doesn't
contradict the comment.
> LGTM in any case.
>
> Regards,
>
> --
> Alexandre Janniaux
> VideoLabs
>
>
> On Tue, Jul 30, 2019 at 10:53:41AM +0200, Pierre Lamot wrote:
>> ---
>> modules/gui/qt/qml/player/Player.qml | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/modules/gui/qt/qml/player/Player.qml
>> b/modules/gui/qt/qml/player/Player.qml
>> index 7b72ee6c36..6ae036ec21 100644
>> --- a/modules/gui/qt/qml/player/Player.qml
>> +++ b/modules/gui/qt/qml/player/Player.qml
>> @@ -146,6 +146,8 @@ Utils.NavigableFocusScope {
>> onActionCancel: rootPlayer.actionCancel(index)
>>
>> Keys.onPressed: {
>> + if (event.accepted)
>> + return
>> if (event.key === Qt.Key_Menu) {
>> toolbarAutoHide.toggleForceVisible()
>> } else {
>> @@ -244,6 +246,8 @@ Utils.NavigableFocusScope {
>>
>> //unhandled keys are forwarded as hotkeys
>> Keys.onPressed: {
>> + if (event.accepted)
>> + return
>> if (event.key === Qt.Key_Menu)
>> toolbarAutoHide.toggleForceVisible()
>> else
>> --
>> 2.17.1
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list