From f7f618b3125289ab6ad68fe6c4ccf9864c41b02f Mon Sep 17 00:00:00 2001 From: Valery Volgutov Date: Wed, 13 Jan 2021 16:03:51 +0300 Subject: evdevtouch: Fix normalizedPosition Set the available virtual screen geometry. This geometry is needed for QEventPoint::normalizedPosition calculation. Pick-to: 6.0 Change-Id: I7e25488d62a5099c14b5c15fa2b4040ea32b9ecd Reviewed-by: Volker Hilsheimer Reviewed-by: Jaeyoon Jung --- src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/platformsupport/input/evdevtouch') diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp index 0497d210e5..cf2f300207 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); } -- cgit v1.2.3