effects/overview: Forward unhandled keys to search field

After user edits the name of a desktop, the search field is no longer
focused. If the user starts typing text, one could expect that it will
be forwarded to the search field without requiring a click.

This change forwards unhandled key events to the search field to ensure
that searching is intuitive.
This commit is contained in:
Vlad Zahorodnii 2021-11-12 15:51:53 +02:00 committed by Fushan Wen
parent 0b56711bf4
commit cc50c64e8d

View file

@ -29,6 +29,9 @@ FocusScope {
Keys.onEscapePressed: effect.deactivate();
Keys.priority: Keys.AfterItem
Keys.forwardTo: searchField
Repeater {
model: KWinComponents.ClientFilterModel {
activity: KWinComponents.Workspace.currentActivity
@ -136,6 +139,7 @@ FocusScope {
clearButtonShown: true
Keys.priority: Keys.AfterItem
Keys.forwardTo: heap
onTextEdited: forceActiveFocus();
}
}