From bcc4ff7305dc0b5dc889391a871c66bfa22e7ee5 Mon Sep 17 00:00:00 2001 From: Jan Blackquill Date: Thu, 20 May 2021 18:10:21 -0400 Subject: [PATCH] lockscreen: make MediaControls tab-focus only Users are unlikely to want focus diverted away from the password field when interacting with the media controls; setting the focus policy to TabFocus makes sure that mouse usage doesn't divert focus while keeping keyboard navigation intact. BUG: 437390 FIXED-IN: 5.22 (cherry picked from commit 5c48f4a33527e3827ca0cd2d7c788119596ba8f3) --- lookandfeel/contents/lockscreen/MediaControls.qml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lookandfeel/contents/lockscreen/MediaControls.qml b/lookandfeel/contents/lockscreen/MediaControls.qml index 7bcbb397c..e312e8123 100644 --- a/lookandfeel/contents/lockscreen/MediaControls.qml +++ b/lookandfeel/contents/lockscreen/MediaControls.qml @@ -134,6 +134,7 @@ Item { } PlasmaComponents3.ToolButton { + focusPolicy: Qt.TabFocus enabled: mpris2Source.canGoBack Layout.preferredHeight: PlasmaCore.Units.gridUnit*2 Layout.preferredWidth: Layout.preferredHeight @@ -147,6 +148,7 @@ Item { } PlasmaComponents3.ToolButton { + focusPolicy: Qt.TabFocus Layout.fillHeight: true Layout.preferredWidth: height // make this button bigger icon.name: mpris2Source.playing ? "media-playback-pause" : "media-playback-start" @@ -158,6 +160,7 @@ Item { } PlasmaComponents3.ToolButton { + focusPolicy: Qt.TabFocus enabled: mpris2Source.canGoNext Layout.preferredHeight: PlasmaCore.Units.gridUnit*2 Layout.preferredWidth: Layout.preferredHeight