From 4bdb94c87fda540cf335e0ff53652e4ea18ea19d Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Wed, 25 Oct 2023 11:52:56 +0000 Subject: [PATCH] Overview: Fix clear button working in overview search onTextEdited only updates on user-invoked key presses, and not programatic changes. This is a better choice when we have a two-way bindings such as with configuration files, but in this case we always want the UI to reflect the current contents of the search box making onTextChanged the better signal. BUG: 475789 --- src/plugins/overview/qml/main.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/overview/qml/main.qml b/src/plugins/overview/qml/main.qml index dbf2d7fef7..1feccd97aa 100644 --- a/src/plugins/overview/qml/main.qml +++ b/src/plugins/overview/qml/main.qml @@ -264,7 +264,8 @@ FocusScope { Keys.priority: Keys.BeforeItem Keys.forwardTo: text && (allDesktopHeaps.currentHeap.count === 0 || !effect.filterWindows) ? searchResults : allDesktopHeaps.currentHeap text: effect.searchText - onTextEdited: { + // not onTextEdited so that the UI always stays in sync + onTextChanged: { effect.searchText = text; allDesktopHeaps.currentHeap.resetSelected(); allDesktopHeaps.currentHeap.selectNextItem(WindowHeap.Direction.Down);