Hello community, here is the log from the commit of package plasma5-desktop for openSUSE:Factory checked in at 2018-10-15 09:17:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/plasma5-desktop (Old) and /work/SRC/openSUSE:Factory/.plasma5-desktop.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "plasma5-desktop" Mon Oct 15 09:17:20 2018 rev:92 rq:641279 version:5.14.0 Changes: -------- --- /work/SRC/openSUSE:Factory/plasma5-desktop/plasma5-desktop.changes 2018-10-08 17:42:53.458677552 +0200 +++ /work/SRC/openSUSE:Factory/.plasma5-desktop.new/plasma5-desktop.changes 2018-10-15 09:17:33.172815106 +0200 @@ -1,0 +2,6 @@ +Thu Oct 11 13:41:27 UTC 2018 - [email protected] + +- Add patch to fix keyboard input on the desktop: + * 0001-Focus-handling-fixes.patch + +------------------------------------------------------------------- New: ---- 0001-Focus-handling-fixes.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ plasma5-desktop.spec ++++++ --- /var/tmp/diff_new_pack.QfTTxE/_old 2018-10-15 09:17:34.940813440 +0200 +++ /var/tmp/diff_new_pack.QfTTxE/_new 2018-10-15 09:17:34.940813440 +0200 @@ -37,8 +37,9 @@ %endif # PATCH-FIX-OPENSUSE Patch1: 0001-Use-themed-user-face-icon-in-kickoff.patch -# PATCHES 100-200 and above are from upstream 5.13 branch -# PATCHES 201-300 and above are from upstream master/5.14 branch +# PATCHES 100-200 and above are from upstream 5.14 branch +Patch100: 0001-Focus-handling-fixes.patch +# PATCHES 201-300 and above are from upstream master/5.15 branch %if 0%{?suse_version} > 1325 BuildRequires: libboost_headers-devel %else ++++++ 0001-Focus-handling-fixes.patch ++++++ >From 15befaaf343bd7f92ac466eed30e4758e07b30b1 Mon Sep 17 00:00:00 2001 From: Fabian Vogt <[email protected]> Date: Thu, 11 Oct 2018 15:40:12 +0200 Subject: [PATCH] Focus handling fixes Summary: * Fix keyboard nav on the desktop again. BUG:399566 * Fix initial focus properly. * Make sure when using arrows after starting Plasma or after clicking into empty space, the first selected item is always 0, not 1 or some random item based on previous activity. * Make sure the view is always scrolled up when (re)opening the popup. Reviewers: broulik, davidedmundson Reviewed By: davidedmundson Subscribers: davidedmundson, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D16106 --- .../desktop/package/contents/ui/FolderView.qml | 6 ++++++ .../desktop/package/contents/ui/FolderViewLayer.qml | 3 +++ containments/desktop/package/contents/ui/main.qml | 12 ++++++++++-- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/containments/desktop/package/contents/ui/FolderView.qml b/containments/desktop/package/contents/ui/FolderView.qml index ed0ba04f..4e9474e5 100644 --- a/containments/desktop/package/contents/ui/FolderView.qml +++ b/containments/desktop/package/contents/ui/FolderView.qml @@ -63,6 +63,10 @@ FocusScope { property var dialog: null property Item editor: null + function positionViewAtBeginning() { + gridView.positionViewAtBeginning(); + } + function rename() { if (gridView.currentIndex != -1) { var renameAction = folderView.model.action("rename"); @@ -279,6 +283,7 @@ FocusScope { if (!hoveredItem || hoveredItem.blank) { if (!gridView.ctrlPressed) { + gridView.currentIndex = -1; dir.clearSelection(); } @@ -1106,6 +1111,7 @@ FocusScope { onListingCompleted: { if (!gridView.model && plasmoid.expanded) { gridView.model = positioner; + gridView.currentIndex = isPopup ? 0 : -1; } } diff --git a/containments/desktop/package/contents/ui/FolderViewLayer.qml b/containments/desktop/package/contents/ui/FolderViewLayer.qml index e9fbb36d..ea925f86 100644 --- a/containments/desktop/package/contents/ui/FolderViewLayer.qml +++ b/containments/desktop/package/contents/ui/FolderViewLayer.qml @@ -42,6 +42,8 @@ FocusScope { readonly property bool lockedByKiosk: !KAuthorized.authorize("editable_desktop_icons") + focus: true + function updateContextualActions() { folderView.model.updateActions(); @@ -170,6 +172,7 @@ FocusScope { if (plasmoid.expanded) { folderView.currentIndex = -1; folderView.forceActiveFocus(); + folderView.positionViewAtBeginning(); } else { goHome(); diff --git a/containments/desktop/package/contents/ui/main.qml b/containments/desktop/package/contents/ui/main.qml index 4b7965ee..b07ebaa9 100644 --- a/containments/desktop/package/contents/ui/main.qml +++ b/containments/desktop/package/contents/ui/main.qml @@ -259,6 +259,12 @@ FolderViewDropArea { return length >= Qt.styleHints.startDragDistance; } + onFocusChanged: { + if (focus && isFolder) { + folderViewLayer.item.forceActiveFocus(); + } + } + onDragEnter: { if (isContainment && plasmoid.immutable && !(isFolder && FolderTools.isFileDrag(event))) { event.ignore(); @@ -415,8 +421,9 @@ FolderViewDropArea { MouseArea { // unfocus any plasmoid when clicking empty desktop area anchors.fill: parent onPressed: { - root.forceActiveFocus() + root.forceActiveFocus(); mouse.accepted = false // Bug 351277 + if (toolBox && toolBox.open) { toolBox.open = false; } @@ -448,8 +455,9 @@ FolderViewDropArea { Connections { target: folderViewLayer.view + // `FolderViewDropArea` is not a FocusScope. We need to forward manually. onPressed: { - folderViewLayer.focus = true; + folderViewLayer.forceActiveFocus(); } } } -- 2.18.0
