summaryrefslogtreecommitdiffstats
path: root/src/plugins/generic
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/generic')
-rw-r--r--src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp6
-rw-r--r--src/plugins/generic/touchscreen/qtoucheventsenderqpa.h3
2 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp b/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp
index d9ec92cda7..08db058e10 100644
--- a/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp
+++ b/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp
@@ -52,6 +52,10 @@ QT_BEGIN_NAMESPACE
QTouchEventSenderQPA::QTouchEventSenderQPA(const QString &spec)
{
m_forceToActiveWindow = spec.split(QLatin1Char(':')).contains(QLatin1String("force_window"));
+ m_device = new QTouchDevice;
+ m_device->setType(QTouchDevice::TouchScreen);
+ m_device->setCapabilities(QTouchDevice::Position | QTouchDevice::Area);
+ QWindowSystemInterface::registerTouchDevice(m_device);
}
void QTouchEventSenderQPA::touch_configure(int x_min, int x_max, int y_min, int y_max)
@@ -103,7 +107,7 @@ void QTouchEventSenderQPA::touch_point(QEvent::Type state,
#endif
}
- QWindowSystemInterface::handleTouchEvent(0, state, QTouchEvent::TouchScreen, touchPoints);
+ QWindowSystemInterface::handleTouchEvent(0, state, m_device, touchPoints);
}
QT_END_NAMESPACE
diff --git a/src/plugins/generic/touchscreen/qtoucheventsenderqpa.h b/src/plugins/generic/touchscreen/qtoucheventsenderqpa.h
index 91a6b4f3bb..b6e1613b24 100644
--- a/src/plugins/generic/touchscreen/qtoucheventsenderqpa.h
+++ b/src/plugins/generic/touchscreen/qtoucheventsenderqpa.h
@@ -48,6 +48,8 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+class QTouchDevice;
+
class QTouchEventSenderQPA : public QTouchScreenObserver
{
public:
@@ -61,6 +63,7 @@ private:
int hw_range_x_max;
int hw_range_y_min;
int hw_range_y_max;
+ QTouchDevice *m_device;
};
QT_END_NAMESPACE