taskswitcher: Fix tapping outside of delegate to close

This commit is contained in:
Devin Lin 2021-12-27 10:05:05 -05:00
parent 1c81cd34b4
commit 2f27eb848d
2 changed files with 7 additions and 1 deletions

View file

@ -23,6 +23,12 @@ Item {
// taphandler activates even if delegate touched // taphandler activates even if delegate touched
TapHandler { TapHandler {
onTapped: {
// if tapped on the background, then hide
if (root.childAt(eventPoint.position.x, eventPoint.position.y) === null) {
taskSwitcher.hide();
}
}
onPressedChanged: { onPressedChanged: {
if (pressed) { if (pressed) {
// ensure animations aren't running when finger is pressed // ensure animations aren't running when finger is pressed

View file

@ -48,7 +48,7 @@ Item {
} }
// TODO close task switcher when an app opens while it is open, otherwise the navbar becomes glitched // TODO close task switcher when an app opens while it is open, otherwise the navbar becomes glitched
// TODO click outside of delegate to close // TODO filter shell windows
//BEGIN functions //BEGIN functions