From 4847ee6eab0e2cc271d1a7421a9ce68b50304ff5 Mon Sep 17 00:00:00 2001
From: Fatih Uzunoglu <fuzun54@outlook.com>
Date: Tue, 4 Feb 2025 17:45:20 +0200
Subject: [PATCH] qml: disable filtering child mouse events in Browse page
 flickable

This fixes pip player can not be dragged properly within the browse
page. Similar to 9b86a3b4.
---
 .../gui/qt/network/qml/BrowseHomeDisplay.qml  | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/modules/gui/qt/network/qml/BrowseHomeDisplay.qml b/modules/gui/qt/network/qml/BrowseHomeDisplay.qml
index ffc30e42e1d0..db80f87cee71 100644
--- a/modules/gui/qt/network/qml/BrowseHomeDisplay.qml
+++ b/modules/gui/qt/network/qml/BrowseHomeDisplay.qml
@@ -149,6 +149,25 @@ FocusScope {
 
         Navigation.parentItem: root
 
+        Component.onCompleted: {
+            // Flickable filters child mouse events for flicking (even when
+            // the delegate is grabbed). However, this is not a useful
+            // feature for non-touch cases, so disable it here and enable
+            // it if touch is detected through the hover handler:
+            MainCtx.setFiltersChildMouseEvents(this, false)
+        }
+
+        HoverHandler {
+            acceptedDevices: PointerDevice.TouchScreen
+
+            onHoveredChanged: {
+                if (hovered)
+                    MainCtx.setFiltersChildMouseEvents(flickable, true)
+                else
+                    MainCtx.setFiltersChildMouseEvents(flickable, false)
+            }
+        }
+
         Widgets.NavigableCol {
             id: column
 
-- 
GitLab