From 40f6abd78ebb05924301efd1f6d9cda1ad82e647 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 22 Feb 2021 14:59:15 +0100 Subject: [PATCH] enable the drag handler only when the containment has focus this way it doesn't steal events anymore from the widget explorer --- containments/homescreen/package/contents/ui/main.qml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/containments/homescreen/package/contents/ui/main.qml b/containments/homescreen/package/contents/ui/main.qml index ae003355..8f1b061f 100644 --- a/containments/homescreen/package/contents/ui/main.qml +++ b/containments/homescreen/package/contents/ui/main.qml @@ -188,7 +188,7 @@ Item { DragHandler { target: mainFlickable yAxis.enabled: !appletsLayout.editMode - enabled: appDrawer.status !== Launcher.AppDrawer.Status.Open + enabled: root.focus && appDrawer.status !== Launcher.AppDrawer.Status.Open onTranslationChanged: { if (active) { appDrawer.offset = -translation.y @@ -317,6 +317,7 @@ Item { appletsLayout.editMode = false; } onLongPressed: appletsLayout.editMode = true; + onPressedChanged: root.focus = true; } cellWidth: favoriteStrip.cellWidth @@ -411,7 +412,7 @@ Item { DragHandler { target: favoriteStrip yAxis.enabled: !appletsLayout.editMode - enabled: appDrawer.status !== Launcher.AppDrawer.Status.Open + enabled: root.focus && appDrawer.status !== Launcher.AppDrawer.Status.Open onTranslationChanged: { if (active) { appDrawer.offset = -translation.y @@ -431,6 +432,7 @@ Item { appletsLayout.editMode = false; } onLongPressed: appletsLayout.editMode = true; + onPressedChanged: root.focus = true; } } }