From 39da07a4d3d9eb27845c4dd01df0d3b99ab80ede Mon Sep 17 00:00:00 2001 From: Valery Volgutov Date: Wed, 13 Jan 2021 16:03:51 +0300 Subject: [PATCH] evdevtouch: Fix normalizedPosition Set the available virtual screen geometry. This geometry is needed for QEventPoint::normalizedPosition calculation. Change-Id: I7e25488d62a5099c14b5c15fa2b4040ea32b9ecd Reviewed-by: Volker Hilsheimer Reviewed-by: Jaeyoon Jung (cherry picked from commit f7f618b3125289ab6ad68fe6c4ccf9864c41b02f) --- src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp index 0497d210e58..cf2f300207d 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp +++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp @@ -49,6 +49,7 @@ #include #include #include +#include #include @@ -465,6 +466,11 @@ void QEvdevTouchScreenHandler::registerPointingDevice() m_device = new QPointingDevice(d->hw_name, id++, QInputDevice::DeviceType::TouchScreen, QPointingDevice::PointerType::Finger, caps, 16, 0); + + auto geom = d->screenGeometry(); + if (!geom.isNull()) + QPointingDevicePrivate::get(m_device)->setAvailableVirtualGeometry(geom); + QWindowSystemInterface::registerInputDevice(m_device); }