summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qinputdevicemanager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QtGui: includemocsMarc Mutz2022-04-291-0/+2
| | | | | | | | | | | Including moc files directly into their classes' TU tends to improve codegen and enables extended compiler warnings, e.g. about unused private functions or fields. Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-102886 Change-Id: I1945741794c25679a9d94c0d68c8642e2c823502 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QtGui: sweep Q_DECLARE_METATYPE → QT_DECL_METATYPE_EXTERN [2/2]: private APIMarc Mutz2022-04-051-0/+2
| | | | | | | | | | | | | It's one of our best tools to improve compile times. Can't backport to Qt 6.2 because the macros don't exist there. Pick-to: 6.3 Task-number: QTBUG-102206 Change-Id: I80734b4d43928fce0e66329b5b897a2738db9b30 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QInputDeviceManager: ++explicit, ++out-of-line-dtorsMarc Mutz2021-08-061-0/+2
| | | | | | | | | It's private API, but exported, so de-inline the dtor to pin the vtable in QtCore instead of potentially duplicating it in every plugin that uses the class. Change-Id: Ia948985bb94677c8453a8e7be27a14085303aaf5 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QInputDeviceManager: replace a QMap<enum,int> with a ↵Marc Mutz2019-06-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | std::array<int,#enum-values> QInputDeviceManager::DeviceType is a (non-flag) enum with all of five values. Using a self-rebalancing rb-tree to map these to an int is overkill. An array can do the job just as well and better, given the enum values are consecutive, and even if some don't make sense (like Unknown), the waste caused by unused array slots is more than compensated by the lack of any memory allocations. Even more so as the array API is 1:1 identical with the map's for the use-case at hand. Saves 1.2KiB in text size on optimized Linux AMD64 GCC 9.1 builds. Change-Id: I1bfa115ac75e2f7d9a4bd9a0e3f3241bf68c9989 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix for mouse with modifiers handlingKarim Pinter2018-05-021-22/+1
| | | | | | | | | | | | Modifier keys are saved in qinputdevicemanager such way that both evdev and libinput can use it the same way, it is also handling the repeating modifier key events. Evdev support is important for VxWorks support because it is using it. Task-number: QTBUG-60694 Change-Id: I49038cb7fe2ad5134b3a37167c19953867ea31c3 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Report modifiers correctly in mouse events with evdev and libinputLaszlo Agocs2017-12-121-0/+44
| | | | | | Task-number: QTBUG-60694 Change-Id: I7b1625e5f31e49cd2ab18a83bbd0f65f9b58088d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Fix failing input device notifications on embeddedLaszlo Agocs2015-05-271-0/+1
| | | | | | | | | | | | The connection to the deviceListChanged() signal may be queued. To make it work our custom types have to be registered. The problem is only visible with input backends like evdevtouch that live on their own thread. Task-number: QTBUG-46069 Change-Id: I4c03e8031e4337b5e711a3bd2cf405d15d6ce214 Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
* Support QCursor::setPos() properly for eglfsLaszlo Agocs2015-03-141-0/+24
| | | | | | | | | | | | | | | | | The internal state of the input handlers need updating too. This was not possible in the past due to the one way communication from the input handlers (that are potentially loaded as interface-less generic plugins), but using our new private QInputDeviceManager in QtGui we can now easily implement "talking back" from QtGui to the input handlers, regardless of them being plugins or compiled in. The rest of setPos() is in place already for eglfs. linuxfb will be handled in follow-up patches. Task-number: QTBUG-44856 Change-Id: Id72fdb8b1ea176ddfe082e466e7a538a2a98a005 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Unify input device hotplugging support for embeddedLaszlo Agocs2015-01-211-0/+64
On embedded the mouse cursor will now appear and reappear regardless of how the input handling code is loaded (via a generic plugin or compiled-in to the platform plugin). Instead of passing around QDeviceDiscovery instances that only works when compiling-in the code into the platform plugin, introduce a new internal central QInputDeviceManager. The single instance of this provides a place to store any future input device related signals and properties. Also introduce mouse hotplugging support to linuxfb. [ChangeLog][QtGui] The mouse cursor on Embedded Linux is now handling hotplugging correctly with eglfs and linuxfb regardless of how the input handling code is loaded (via a generic plugin or built in to the platform plugin). Change-Id: I147c1b04a193baf216598015264f2c06e1b20f84 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>