From 2f27eb848d6fd435ea772916bdd3a8cc560b1ad3 Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Mon, 27 Dec 2021 10:05:05 -0500 Subject: [PATCH] taskswitcher: Fix tapping outside of delegate to close --- components/mobileshell/qml/taskswitcher/TaskList.qml | 6 ++++++ components/mobileshell/qml/taskswitcher/TaskSwitcher.qml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/components/mobileshell/qml/taskswitcher/TaskList.qml b/components/mobileshell/qml/taskswitcher/TaskList.qml index e7102519..38b1ed0b 100644 --- a/components/mobileshell/qml/taskswitcher/TaskList.qml +++ b/components/mobileshell/qml/taskswitcher/TaskList.qml @@ -23,6 +23,12 @@ Item { // taphandler activates even if delegate touched TapHandler { + onTapped: { + // if tapped on the background, then hide + if (root.childAt(eventPoint.position.x, eventPoint.position.y) === null) { + taskSwitcher.hide(); + } + } onPressedChanged: { if (pressed) { // ensure animations aren't running when finger is pressed diff --git a/components/mobileshell/qml/taskswitcher/TaskSwitcher.qml b/components/mobileshell/qml/taskswitcher/TaskSwitcher.qml index 9a368225..fdca9841 100644 --- a/components/mobileshell/qml/taskswitcher/TaskSwitcher.qml +++ b/components/mobileshell/qml/taskswitcher/TaskSwitcher.qml @@ -48,7 +48,7 @@ Item { } // 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