Commit dcc77bfa authored by Niklas Stephanblome's avatar Niklas Stephanblome Committed by Nate Graham
Browse files

Windowview: Fix broken keyboard navigation while filtering

After the 5.25 update, one could not see which window was highlighted until one
manually unfocused the SearchField and then pressed any key to refresh the WindowHeap.
Also, the searchbar would (most of the time) "absorb" the arrow keys so one had to
also unfocus it to really be able to select windows with they keyboard. 

With this change, there is always one window highlighted while filtering using the
search box. Also, one can select another window with the arrow keys without manually
unfocusing the searchbox. This heavily improves the keyboard functionality in this
effect that got lost with the 5.25 update of presentwindows to windowview and
resolves complaints about the keyboard navigation being buggy. 

BUG: 455633
BUG: 455764
BUG: 455099
BUG: 455586
BUG: 455753
FIXED-IN: 5.25.2

(cherry picked from commit 6838b113)
parent 35273ae5
Pipeline #194568 passed with stage
in 39 minutes and 16 seconds
......@@ -75,10 +75,14 @@ Item {
Layout.alignment: Qt.AlignCenter
Layout.topMargin: PlasmaCore.Units.gridUnit
Layout.preferredWidth: Math.min(parent.width, 20 * PlasmaCore.Units.gridUnit)
focus: true
focus: false
// Binding loops will be avoided from the fact that setting the text to the same won't emit textChanged
// We can't use activeFocus because is not reliable on qml effects
onTextChanged: effect.searchText = text
onTextChanged: {
effect.searchText = text;
Binding {
target: searchField
property: "text"
......@@ -307,6 +307,7 @@ void WindowViewEffect::activate(const QStringList &windowIds)
if (!internalIds.isEmpty()) {
m_windowIds = internalIds;
m_searchText = "";
......@@ -324,6 +325,7 @@ void WindowViewEffect::activate()
// This one should be the last.
m_searchText = "";
......@@ -339,6 +341,7 @@ void WindowViewEffect::partialActivate(qreal factor)
// This one should be the last.
m_searchText = "";
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment