diff options
author | Valery Volgutov <valery.volgutov@lge.com> | 2021-01-13 16:03:51 +0300 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-01-27 06:53:30 +0000 |
commit | 39da07a4d3d9eb27845c4dd01df0d3b99ab80ede (patch) | |
tree | edb1261bc9cfd057cbf6eb9392fb2e3810c8e7e4 /src | |
parent | 27cde011277b18e06de75b3369c4a13451e6c3b0 (diff) |
evdevtouch: Fix normalizedPosition
Set the available virtual screen geometry. This geometry
is needed for QEventPoint::normalizedPosition calculation.
Change-Id: I7e25488d62a5099c14b5c15fa2b4040ea32b9ecd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
(cherry picked from commit f7f618b3125289ab6ad68fe6c4ccf9864c41b02f)
Diffstat (limited to 'src')
-rw-r--r-- | src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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 <QtGui/qpointingdevice.h> #include <QtGui/private/qhighdpiscaling_p.h> #include <QtGui/private/qguiapplication_p.h> +#include <QtGui/private/qpointingdevice_p.h> #include <mutex> @@ -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); } |