effects/overview: Move Escape key handling to ScreenView
With this, no individual component has to handle the Escape key to deactivate the effect.
This commit is contained in:
parent
25b035e84c
commit
ca4e643d67
3 changed files with 3 additions and 4 deletions
|
@ -201,6 +201,7 @@ Item {
|
|||
id: editor
|
||||
anchors.fill: parent
|
||||
visible: label.state == "editing"
|
||||
focus: visible
|
||||
topPadding: 0
|
||||
bottomPadding: 0
|
||||
text: delegate.desktop.name
|
||||
|
@ -226,7 +227,6 @@ Item {
|
|||
}
|
||||
function stopEditing() {
|
||||
state = "normal";
|
||||
searchField.forceActiveFocus();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@ FocusScope {
|
|||
container.organized = false;
|
||||
}
|
||||
|
||||
Keys.onEscapePressed: effect.deactivate();
|
||||
|
||||
Repeater {
|
||||
model: KWinComponents.ClientFilterModel {
|
||||
activity: KWinComponents.Workspace.currentActivity
|
||||
|
|
|
@ -428,9 +428,6 @@ FocusScope {
|
|||
|
||||
Keys.onPressed: {
|
||||
switch (event.key) {
|
||||
case Qt.Key_Escape:
|
||||
effect.deactivate();
|
||||
break;
|
||||
case Qt.Key_Up:
|
||||
selectNextItem(WindowHeap.Direction.Up);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue