From b638a7da38eba2e520a0636b9b08602a556b4849 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 14 Sep 2016 14:05:05 +0200 Subject: eglfs: Add missing virtual layout setting for DRM/KMS Just setting virtualDesktopLayout and virtualIndex are not always enough. To create more complex shapes (e.g. a T-shaped cluster) the top-left position has to be specified explicitly. Enable this via an optional virtualPos property. This also involves improving evdevtouch's mapping functionality. Instead of fragile indices, rely on the screen name instead. Change-Id: I138840779032ad9da674bfef7763adfdfc74ccd4 Reviewed-by: Andy Nichols --- src/platformsupport/input/shared/qtouchoutputmapping.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/platformsupport/input/shared/qtouchoutputmapping.cpp') diff --git a/src/platformsupport/input/shared/qtouchoutputmapping.cpp b/src/platformsupport/input/shared/qtouchoutputmapping.cpp index 55c1dc34f4..0a1afd4739 100644 --- a/src/platformsupport/input/shared/qtouchoutputmapping.cpp +++ b/src/platformsupport/input/shared/qtouchoutputmapping.cpp @@ -71,21 +71,21 @@ bool QTouchOutputMapping::load() const QVariantMap output = outputs.at(i).toObject().toVariantMap(); if (!output.contains(QStringLiteral("touchDevice"))) continue; - if (!output.contains(QStringLiteral("virtualIndex"))) { - qWarning("evdevtouch: Output %d specifies touchDevice but not virtualIndex, this is wrong", i); + if (!output.contains(QStringLiteral("name"))) { + qWarning("evdevtouch: Output %d specifies touchDevice but not name, this is wrong", i); continue; } const QString &deviceNode = output.value(QStringLiteral("touchDevice")).toString(); - const int screenIndex = output.value(QStringLiteral("virtualIndex")).toInt(); - m_screenIndexTable.insert(deviceNode, screenIndex); + const QString &screenName = output.value(QStringLiteral("name")).toString(); + m_screenTable.insert(deviceNode, screenName); } return true; } -int QTouchOutputMapping::screenIndexForDeviceNode(const QString &deviceNode) +QString QTouchOutputMapping::screenNameForDeviceNode(const QString &deviceNode) { - return m_screenIndexTable.value(deviceNode, -1); + return m_screenTable.value(deviceNode); } QT_END_NAMESPACE -- cgit v1.2.3