summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/input/evdevtouch
diff options
context:
space:
mode:
authorElvis Lee <kwangwoong.lee@lge.com>2020-09-24 16:54:50 +0900
committerShawn Rutledge <shawn.rutledge@qt.io>2020-10-27 23:37:41 +0100
commit4b899a29fa5a8acc381673e6b527345f8eaad7b5 (patch)
tree0cf12c82c677f5cab56e26a2984dd7c4f54f38f6 /src/platformsupport/input/evdevtouch
parentfd8e6a203ecfeebc03772b3bce14c91a6fc0a8e1 (diff)
webOS: Support mapping evdev keyboard and touchscreen to specific window
First we refactor QTouchOutputMapping into a QOutputMapping base class and a QDefaultOutputMapping subclass, because it will be used to map more kinds of devices, not only touchscreens. On WebOS, the plan is to have a custom subclass that overrides an additional windowForDeviceNode() virtual function, so that events from specific devices can be sent to specific windows. But in the future, Qt may have a more generic mechanism for mapping devices to screens, and of course windows are displayed on screens; so this direct device->window mapping is likely to be temporary. In the QT_QPA_EGLFS_KMS_CONFIG JSON configuration, symlinked device nodes are now supported. Task-number: QTBUG-85268 Change-Id: Id1f0bb59f4a439abaec6bd35016c95de1cbdb26a Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/platformsupport/input/evdevtouch')
-rw-r--r--src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
index 37b3ec7fec..0497d210e5 100644
--- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
+++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
@@ -39,7 +39,7 @@
****************************************************************************/
#include "qevdevtouchhandler_p.h"
-#include "qtouchoutputmapping_p.h"
+#include "qoutputmapping_p.h"
#include <QStringList>
#include <QHash>
#include <QSocketNotifier>
@@ -350,9 +350,9 @@ QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(const QString &device, const
if (inverty)
d->m_rotate *= QTransform::fromTranslate(0.5, 0.5).scale(1.0, -1.0).translate(-0.5, -0.5);
- QTouchOutputMapping mapping;
- if (mapping.load()) {
- d->m_screenName = mapping.screenNameForDeviceNode(d->deviceNode);
+ QOutputMapping *mapping = QOutputMapping::get();
+ d->m_screenName = mapping->screenNameForDeviceNode(d->deviceNode);
+ if (mapping->load()) {
if (!d->m_screenName.isEmpty())
qCDebug(qLcEvdevTouch, "evdevtouch: Mapping device %ls to screen %ls",
qUtf16Printable(d->deviceNode), qUtf16Printable(d->m_screenName));
@@ -728,7 +728,7 @@ QRect QEvdevTouchScreenData::screenGeometry() const
// suddenly it was all broken.
//
// For now we only support the display configuration of the KMS/DRM
- // backends of eglfs. See QTouchOutputMapping.
+ // backends of eglfs. See QOutputMapping.
//
// The good news it that once winRect refers to the correct screen
// geometry in the full virtual desktop space, there is nothing else