From 3a95c202794934a98b749ee249d686359ae38ca1 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 13 Sep 2023 13:25:57 +0000 Subject: [PATCH] Fix touch on PointerHandlers The events we forward to the offscreen QML view are with our own QPointingDevice instance, which has a devicetype of touch but a null pointerType. In Qt5 this was enough, but pointerhandlers in qt6 refuse events with an undefined pointertype, so we have to explicitly set it to finger BUG:473541 --- src/libkwineffects/kwinoffscreenquickview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libkwineffects/kwinoffscreenquickview.cpp b/src/libkwineffects/kwinoffscreenquickview.cpp index 47f6f04551..3548a98990 100644 --- a/src/libkwineffects/kwinoffscreenquickview.cpp +++ b/src/libkwineffects/kwinoffscreenquickview.cpp @@ -146,7 +146,7 @@ OffscreenQuickView::OffscreenQuickView(QObject *parent, ExportMode exportMode) connect(d->m_renderControl.get(), &QQuickRenderControl::renderRequested, this, &OffscreenQuickView::handleRenderRequested); connect(d->m_renderControl.get(), &QQuickRenderControl::sceneChanged, this, &OffscreenQuickView::handleSceneChanged); - d->touchDevice = new QPointingDevice({}, {}, QInputDevice::DeviceType::TouchScreen, {}, QInputDevice::Capability::Position, 10, {}); + d->touchDevice = new QPointingDevice(QStringLiteral("ForwardingTouchDevice"), {}, QInputDevice::DeviceType::TouchScreen, QPointingDevice::PointerType::Finger, QInputDevice::Capability::Position, 10, {}); } OffscreenQuickView::~OffscreenQuickView()