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 <volker.hilsheimer@qt.io> Reviewed-by: Jaeyoon Jung <jaeyoon.jung@lge.com>bb10
parent
ba62256c5a
commit
f7f618b312
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue