diff options
Diffstat (limited to 'src/platformsupport/input')
-rw-r--r-- | src/platformsupport/input/.prev_CMakeLists.txt | 102 | ||||
-rw-r--r-- | src/platformsupport/input/CMakeLists.txt | 107 | ||||
-rw-r--r-- | src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp | 20 | ||||
-rw-r--r-- | src/platformsupport/input/libinput/qlibinputtouch.cpp | 1 | ||||
-rw-r--r-- | src/platformsupport/input/xkbcommon/CMakeLists.txt | 32 |
5 files changed, 252 insertions, 10 deletions
diff --git a/src/platformsupport/input/.prev_CMakeLists.txt b/src/platformsupport/input/.prev_CMakeLists.txt new file mode 100644 index 0000000000..f8c05e9f97 --- /dev/null +++ b/src/platformsupport/input/.prev_CMakeLists.txt @@ -0,0 +1,102 @@ +# Generated from input.pro. + +##################################################################### +## InputSupport Module: +##################################################################### + +qt_add_module(InputSupport + STATIC + INTERNAL_MODULE + DEFINES + QT_NO_CAST_FROM_ASCII + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::DeviceDiscoverySupportPrivate + Qt::GuiPrivate + PRECOMPILED_HEADER + "../../corelib/global/qt_pch.h" +) + +#### Keys ignored in scope 3:.:.:input-support.pro:<TRUE>: +# MODULE = "input_support" + +## Scopes: +##################################################################### + +qt_extend_target(InputSupport CONDITION QT_FEATURE_evdev + SOURCES + evdevkeyboard/qevdevkeyboard_defaultmap_p.h + evdevkeyboard/qevdevkeyboardhandler.cpp evdevkeyboard/qevdevkeyboardhandler_p.h + evdevkeyboard/qevdevkeyboardmanager.cpp evdevkeyboard/qevdevkeyboardmanager_p.h + evdevmouse/qevdevmousehandler.cpp evdevmouse/qevdevmousehandler_p.h + evdevmouse/qevdevmousemanager.cpp evdevmouse/qevdevmousemanager_p.h + evdevtouch/qevdevtouchhandler.cpp evdevtouch/qevdevtouchhandler_p.h + evdevtouch/qevdevtouchmanager.cpp evdevtouch/qevdevtouchmanager_p.h + INCLUDE_DIRECTORIES + evdevtouch/../shared +) + +qt_extend_target(InputSupport CONDITION QT_FEATURE_evdev AND QT_FEATURE_tabletevent + SOURCES + evdevtablet/qevdevtablethandler.cpp evdevtablet/qevdevtablethandler_p.h + evdevtablet/qevdevtabletmanager.cpp evdevtablet/qevdevtabletmanager_p.h +) + +qt_extend_target(InputSupport CONDITION QT_FEATURE_evdev AND QT_FEATURE_libudev AND QT_FEATURE_tabletevent + LIBRARIES + PkgConfig::Libudev +) + +qt_extend_target(InputSupport CONDITION QT_FEATURE_evdev AND QT_FEATURE_libudev + LIBRARIES + PkgConfig::Libudev +) + +qt_extend_target(InputSupport CONDITION QT_FEATURE_evdev AND QT_FEATURE_mtdev + LIBRARIES + PkgConfig::Mtdev +) + +qt_extend_target(InputSupport CONDITION QT_FEATURE_tslib + SOURCES + tslib/qtslib.cpp tslib/qtslib_p.h + PUBLIC_LIBRARIES + PkgConfig::Tslib +) + +qt_extend_target(InputSupport CONDITION QT_FEATURE_libinput + SOURCES + libinput/qlibinputhandler.cpp libinput/qlibinputhandler_p.h + libinput/qlibinputkeyboard.cpp libinput/qlibinputkeyboard_p.h + libinput/qlibinputpointer.cpp libinput/qlibinputpointer_p.h + libinput/qlibinputtouch.cpp libinput/qlibinputtouch_p.h + INCLUDE_DIRECTORIES + libinput/../shared + LIBRARIES + Libinput::Libinput + PkgConfig::Libudev +) + +qt_extend_target(InputSupport CONDITION QT_FEATURE_libinput AND QT_FEATURE_xkbcommon + LIBRARIES + XKB::XKB + PUBLIC_LIBRARIES + Qt::XkbCommonSupportPrivate +) + +qt_extend_target(InputSupport CONDITION QT_FEATURE_evdev OR QT_FEATURE_libinput + SOURCES + shared/devicehandlerlist_p.h + shared/qevdevutil.cpp shared/qevdevutil_p.h + shared/qtouchoutputmapping.cpp shared/qtouchoutputmapping_p.h +) + +qt_extend_target(InputSupport CONDITION QT_FEATURE_integrityhid + SOURCES + integrityhid/qintegrityhidmanager.cpp integrityhid/qintegrityhidmanager.h + LIBRARIES + integrityhid +) +if(QT_FEATURE_xkbcommon) + add_subdirectory(xkbcommon) +endif() diff --git a/src/platformsupport/input/CMakeLists.txt b/src/platformsupport/input/CMakeLists.txt new file mode 100644 index 0000000000..7ab93df062 --- /dev/null +++ b/src/platformsupport/input/CMakeLists.txt @@ -0,0 +1,107 @@ +# Generated from input.pro. + +qt_find_package(Libinput) # special case +qt_find_package(XKB) # special case +qt_find_package(Tslib) # special case +qt_find_package(Mtdev) # special case + +##################################################################### +## InputSupport Module: +##################################################################### + +qt_add_module(InputSupport + STATIC + INTERNAL_MODULE + DEFINES + QT_NO_CAST_FROM_ASCII + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::DeviceDiscoverySupportPrivate + Qt::GuiPrivate + PRECOMPILED_HEADER + "../../corelib/global/qt_pch.h" +) + +#### Keys ignored in scope 3:.:.:input-support.pro:<TRUE>: +# MODULE = "input_support" + +## Scopes: +##################################################################### + +qt_extend_target(InputSupport CONDITION QT_FEATURE_evdev + SOURCES + evdevkeyboard/qevdevkeyboard_defaultmap_p.h + evdevkeyboard/qevdevkeyboardhandler.cpp evdevkeyboard/qevdevkeyboardhandler_p.h + evdevkeyboard/qevdevkeyboardmanager.cpp evdevkeyboard/qevdevkeyboardmanager_p.h + evdevmouse/qevdevmousehandler.cpp evdevmouse/qevdevmousehandler_p.h + evdevmouse/qevdevmousemanager.cpp evdevmouse/qevdevmousemanager_p.h + evdevtouch/qevdevtouchhandler.cpp evdevtouch/qevdevtouchhandler_p.h + evdevtouch/qevdevtouchmanager.cpp evdevtouch/qevdevtouchmanager_p.h + INCLUDE_DIRECTORIES + evdevtouch/../shared +) + +qt_extend_target(InputSupport CONDITION QT_FEATURE_evdev AND QT_FEATURE_tabletevent + SOURCES + evdevtablet/qevdevtablethandler.cpp evdevtablet/qevdevtablethandler_p.h + evdevtablet/qevdevtabletmanager.cpp evdevtablet/qevdevtabletmanager_p.h +) + +qt_extend_target(InputSupport CONDITION QT_FEATURE_evdev AND QT_FEATURE_libudev AND QT_FEATURE_tabletevent + LIBRARIES + PkgConfig::Libudev +) + +qt_extend_target(InputSupport CONDITION QT_FEATURE_evdev AND QT_FEATURE_libudev + LIBRARIES + PkgConfig::Libudev +) + +qt_extend_target(InputSupport CONDITION QT_FEATURE_evdev AND QT_FEATURE_mtdev + LIBRARIES + PkgConfig::Mtdev +) + +qt_extend_target(InputSupport CONDITION QT_FEATURE_tslib + SOURCES + tslib/qtslib.cpp tslib/qtslib_p.h + PUBLIC_LIBRARIES + PkgConfig::Tslib +) + +qt_extend_target(InputSupport CONDITION QT_FEATURE_libinput + SOURCES + libinput/qlibinputhandler.cpp libinput/qlibinputhandler_p.h + libinput/qlibinputkeyboard.cpp libinput/qlibinputkeyboard_p.h + libinput/qlibinputpointer.cpp libinput/qlibinputpointer_p.h + libinput/qlibinputtouch.cpp libinput/qlibinputtouch_p.h + INCLUDE_DIRECTORIES + libinput/../shared + LIBRARIES + Libinput::Libinput + PkgConfig::Libudev +) + +qt_extend_target(InputSupport CONDITION QT_FEATURE_libinput AND QT_FEATURE_xkbcommon + LIBRARIES + XKB::XKB + PUBLIC_LIBRARIES + Qt::XkbCommonSupportPrivate +) + +qt_extend_target(InputSupport CONDITION QT_FEATURE_evdev OR QT_FEATURE_libinput + SOURCES + shared/devicehandlerlist_p.h + shared/qevdevutil.cpp shared/qevdevutil_p.h + shared/qtouchoutputmapping.cpp shared/qtouchoutputmapping_p.h +) + +qt_extend_target(InputSupport CONDITION QT_FEATURE_integrityhid + SOURCES + integrityhid/qintegrityhidmanager.cpp integrityhid/qintegrityhidmanager.h + LIBRARIES + integrityhid +) +if(QT_FEATURE_xkbcommon) + add_subdirectory(xkbcommon) +endif() diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp index 78728ef4ce..13829c040e 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp +++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp @@ -580,9 +580,7 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data) Qt::TouchPointStates combinedStates; bool hasPressure = false; - for (auto i = m_contacts.begin(), end = m_contacts.end(); i != end; /*erasing*/) { - auto it = i++; - + for (auto it = m_contacts.begin(), end = m_contacts.end(); it != end; /*erasing*/) { Contact &contact(it.value()); if (!contact.state) @@ -605,7 +603,7 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data) // Avoid reporting a contact in released state more than once. if (!m_typeB && contact.state == Qt::TouchPointReleased && !m_lastContacts.contains(key)) { - m_contacts.erase(it); + it = m_contacts.erase(it); continue; } @@ -613,6 +611,7 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data) hasPressure = true; addTouchPoint(contact, &combinedStates); + ++it; } // Now look for contacts that have disappeared since the last sync. @@ -633,22 +632,23 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data) } // Remove contacts that have just been reported as released. - for (auto i = m_contacts.begin(), end = m_contacts.end(); i != end; /*erasing*/) { - auto it = i++; - + for (auto it = m_contacts.begin(), end = m_contacts.end(); it != end; /*erasing*/) { Contact &contact(it.value()); if (!contact.state) continue; if (contact.state == Qt::TouchPointReleased) { - if (m_typeB) + if (m_typeB) { contact.state = static_cast<Qt::TouchPointState>(0); - else - m_contacts.erase(it); + } else { + it = m_contacts.erase(it); + continue; + } } else { contact.state = Qt::TouchPointStationary; } + ++it; } m_lastContacts = m_contacts; diff --git a/src/platformsupport/input/libinput/qlibinputtouch.cpp b/src/platformsupport/input/libinput/qlibinputtouch.cpp index 446218e4b3..f00df6b674 100644 --- a/src/platformsupport/input/libinput/qlibinputtouch.cpp +++ b/src/platformsupport/input/libinput/qlibinputtouch.cpp @@ -42,6 +42,7 @@ #include <libinput.h> #include <QtGui/QGuiApplication> #include <QtGui/QScreen> +#include <QtGui/QTouchDevice> #include <QtGui/private/qhighdpiscaling_p.h> QT_BEGIN_NAMESPACE diff --git a/src/platformsupport/input/xkbcommon/CMakeLists.txt b/src/platformsupport/input/xkbcommon/CMakeLists.txt new file mode 100644 index 0000000000..86d132d912 --- /dev/null +++ b/src/platformsupport/input/xkbcommon/CMakeLists.txt @@ -0,0 +1,32 @@ +# Generated from xkbcommon.pro. + +##################################################################### +## XkbCommonSupport Module: +##################################################################### + +qt_add_module(XkbCommonSupport + STATIC + INTERNAL_MODULE + SOURCES + qxkbcommon.cpp qxkbcommon_p.h + qxkbcommon_3rdparty.cpp + DEFINES + QT_NO_CAST_FROM_ASCII + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::GuiPrivate + XKB::XKB + PRECOMPILED_HEADER + "../../../corelib/global/qt_pch.h" +) + +#### Keys ignored in scope 1:.:.:xkbcommon.pro:<TRUE>: +# MODULE = "xkbcommon_support" + +## Scopes: +##################################################################### + +qt_extend_target(XkbCommonSupport CONDITION CLANG AND NOT ICC + COMPILE_OPTIONS + -ftemplate-depth=1024 +) |