summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
Commit message (Collapse)AuthorAgeFilesLines
* evdev: Prevent race condition in touch events processingJungi Byun2022-01-261-1/+38
| | | | | | | | | | | | | | | | | Unlike other input devices, touch devices are managed by corresponding handler threads which are not the main thread. InputEvent that is inherited by TouchEvent has a constant pointer member for device, but in touch events case, handler threads may destroy the device which is pointed by events while processing these events in main thread, and this may cause critical potential issues such as crash. In order to prevent this race condition, move device of QEvdevTouchScreenHandler into main thread and delete this device later if QGuiApplication instance exists when handler thread quits, and check event's device is valid when processing touch events. Change-Id: I02583238d97d768abcc544ee882160eda3178282 Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Test for nullptr before dereferencing the screenVolker Hilsheimer2021-12-081-1/+1
| | | | | | | | | | | | | Touch event processing might still be ongoing even after the screen has been disconnected. If that screen was also the primary screen, we would dereference nullptr. Check for nullptr to avoid potential crashes during shutdown. Fixes: QTBUG-95192 Pick-to: 6.2 5.15 Change-Id: I49ccd30c4126fe12cf5bb675e532e6e59b40b9c1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* evdevtouch: Fix loading screen name for output mappingDavid Rosca2021-10-121-1/+1
| | | | | | | | Accidentally broken in 4b899a29fa Change-Id: I8ff52153c3549fcda4ebd178cc4fc1ea9538be86 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com>
* evdevtouch: Fix wrong addTouchPoint for "mtdev"Valery Volgutov2021-02-231-3/+7
| | | | | | | | | | | | | | | Origin patch 359546b069051213a7b337fefbe21b664618f959 has following rule: "the state for processed released points is reset to zero at the end of the SYN_REPORT handler" Patch 4e400369c08db251cd489fec1229398c224d02b4 changed state according new event refactor, but not fully. Task-number: QTBUG-86013 Pick-to: 5.15 6.0 6.1 Change-Id: If35b756d5c726533f11d18e7b73c98fffa17d809 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* evdevtouch: Fix normalizedPositionValery Volgutov2021-01-271-0/+6
| | | | | | | | | | Set the available virtual screen geometry. This geometry is needed for QEventPoint::normalizedPosition calculation. Pick-to: 6.0 Change-Id: I7e25488d62a5099c14b5c15fa2b4040ea32b9ecd Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
* webOS: Support mapping evdev keyboard and touchscreen to specific windowElvis Lee2020-10-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | 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>
* QHighDpi: window geometry scaling functionsMorten Johan Sørvig2020-10-201-1/+1
| | | | | | | | | | | | | | | | | | Add functions which scales window geometry: framNativeWindowGeometry() toNativeWindowGeometry() These correctly handles top-level and child windows, where top-level window positions scale around the screen origin while child window positions scale around (0, 0). Modify call cites to use the new functions. We no longer need the isTopLevel checks at the call site. Change-Id: I0158672d46a3f52dfc7d37d021fc5cebd7859200 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Properly free m_mtdev when mtdev_open() returns an errorSteffen Kieß2020-08-261-0/+1
| | | | | | Pick-to: 5.15 Change-Id: I57813da1eafe9fbc9d60b865e867558791e34528 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Refactor pointer event hierarchyShawn Rutledge2020-07-101-28/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some goals that have hopefully been achieved are: - make QPointerEvent and QEventPoint resemble their Qt Quick counterparts to such an extent that we can remove those wrappers and go back to delivering the original events in Qt Quick - make QEventPoint much smaller than QTouchEvent::TouchPoint, with no pimpl - remove most public setters - reduce the usage of complex constructors that take many arguments - don't repeat ourselves: move accessors and storage upwards rather than having redundant ones in subclasses - standardize the set of accessors in QPointerEvent - maintain source compatibility as much as possible: do not require modifying event-handling code in any QWidget subclass To avoid public setters we now introduce a few QMutable* subclasses. This is a bit like the Builder pattern except that it doesn't involve constructing a separate disposable object: the main event type can be cast to the mutable type at any time to enable modifications, iff the code is linked with gui-private. Therefore event classes can have less-"complete" constructors, because internal Qt code can use setters the same way it could use the ones in QTouchEvent before; and the event classes don't need many friends. Even some read-accessors can be kept private unless we are sure we want to expose them. Task-number: QTBUG-46266 Fixes: QTBUG-72173 Change-Id: I740e4e40165b7bc41223d38b200bbc2b403e07b6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Introduce QInputDevice hierarchy; replace QTouchDeviceShawn Rutledge2020-06-161-24/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have seen during the Qt 5 series that QMouseEvent::source() does not provide enough information: if it is synthesized, it could have come from any device for which mouse events are synthesized, not only from a touchscreen. By providing in every QInputEvent as complete information about the actual source device as possible, we will enable very fine-tuned behavior in the object that handles each event. Further, we would like to support multiple keyboards, pointing devices, and named groups of devices that are known as "seats" in Wayland. In Qt 5, QPA plugins registered each touchscreen as it was discovered. Now we extend this pattern to all input devices. This new requirement can be implemented gradually; for now, if a QTWSI input event is received wtihout a device pointer, a default "core" device will be created on-the-fly, and a warning emitted. In Qt 5, QTouchEvent::TouchPoint::id() was forced to be unique even when multiple devices were in use simultaneously. Now that each event identifies the device it came from, this hack is no longer needed. A stub of the new QPointerEvent is added; it will be developed further in subsequent patches. [ChangeLog][QtGui][QInputEvent] Every QInputEvent now carries a pointer to an instance of QInputDevice, or the subclass QPointingDevice in case of mouse, touch and tablet events. Each platform plugin is expected to create the device instances, register them, and provide valid pointers with all input events. If this is not done, warnings are emitted and default devices are created as necessary. When the device has accurate information, it provides the opportunity to fine-tune behavior depending on device type and capabilities: for example if a QMouseEvent is synthesized from a touchscreen, the recipient can see which touchscreen it came from. Each device also has a seatName to distinguish users on multi-user windowing systems. Touchpoint IDs are no longer unique on their own, but the combination of ID and device is. Fixes: QTBUG-46412 Fixes: QTBUG-72167 Task-number: QTBUG-69433 Task-number: QTBUG-52430 Change-Id: I933fb2b86182efa722037b7a33e404c5daf5292a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* evdevtouch: fix input_event time related compilePeter Seiderer2020-05-071-1/+9
| | | | | | | | | | | | | | | | | | | Fixes: evdevtouch/qevdevtouchhandler.cpp: In member function ‘void QEvdevTouchScreenData::processInputEvent(input_event*)’: evdevtouch/qevdevtouchhandler.cpp:579:29: error: ‘struct input_event’ has no member named ‘time’; did you mean ‘type’? m_timeStamp = data->time.tv_sec + data->time.tv_usec / 1000000.0; ^~~~ type evdevtouch/qevdevtouchhandler.cpp:579:49: error: ‘struct input_event’ has no member named ‘time’; did you mean ‘type’? m_timeStamp = data->time.tv_sec + data->time.tv_usec / 1000000.0; ^~~~ type Task-number: QTBUG-84012 Change-Id: Ib8d726a0baf2bdc85da9341229fffaddc0e373ee Pick-to: 5.15 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Don't store iterators on QHash while erasingLars Knoll2020-04-011-10/+10
| | | | | | | | QHash::erase() in the new QHash will invalidate all iterators pointing into the hash. Change-Id: Ia54e8485a947cd7274f832c7c8c624d0aaded4ba Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Avoid initializing QFlags with 0 or nullptr in further casesFriedemann Kleint2019-11-221-9/+6
| | | | | | | | | Amends qtbase/af2daafde72db02454d24b7d691aa6861525ab99. Where applicable, port over to member initialization, thus also fixing nullptr warnings. Change-Id: Iaaf2dbbbcf2952253390b8839fd15a1b17be32c0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add qt.qpa.input.events logging to evdevtouchShawn Rutledge2019-10-101-0/+7
| | | | | | | | | | The xcb platform plugin uses this category for detailed input event logging, so we might as well be consistent in evdevtouch. When hardware supports pressure sensing, it's likely to need extra debugging. Task-number: QTBUG-77142 Change-Id: I7682bb5d49e669054523f9cf556715e511bcd572 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* evdevtouch: Report stationary touchpoints that include pressure changesShawn Rutledge2019-10-081-1/+5
| | | | | | Task-number: QTBUG-77142 Change-Id: I35446092679573df51891302155c896a3bb6fc1c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Joerg Bornemann2019-09-201-2/+5
|\ | | | | | | | | | | | | | | Conflicts: qmake/generators/makefile.cpp qmake/generators/makefile.h Change-Id: I4c2deac4f6376c85f5e4fe7fb0ccc9ab9a013cd7
| * evdevtouch: Add fallback definition of ABS_MT_PRESSURE; fix alignmentShawn Rutledge2019-09-171-2/+5
| | | | | | | | | | | | Fixes: QTBUG-78298 Change-Id: Ib6acb1fdca551a84aba5dec2f28cf784a212692c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Friedemann Kleint2019-09-091-1/+1
|\| | | | | | | | | | | | | Conflicts: tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp Change-Id: Idd3ca5cb9a2b95a4c3513b2a4c8966e6f56193f1
| * Deliver stationary touchpoints that have changed pressureShawn Rutledge2019-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | As a rule, we don't deliver touch events containing only stationary touchpoints. To fix QTBUG-52510 we added an exception in 1bd0ab7050304d9e8989cde77e486947c56b9696 : if the velocity changed, deliver it anyway. Now we need to do the same if the pressure changed. Also, on the customer's hardware, pressure is indicated via ABS_MT_PRESSURE. Change-Id: If7f7088df055d686cdd86967b999e38024f8170f Fixes: QTBUG-77142 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | QEvdev: use printf-style qCDebug()/qWarning()Marc Mutz2019-06-111-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Also use qUtf16Printable() and qErrnoWarning (removing explicit errno, where present). Saves 6.6KiB in text size on optimized Linux AMD64 GCC 9.1 build across all .so's that link to QtInputSupport.a. Change-Id: I1def2cfabd2eed65390099cd1d06f8061a9355be Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | QEvdevTouchScreenData: remove use of Java-style iteratorsMarc Mutz2019-05-241-11/+9
| | | | | | | | | | | | | | They will be deprecated. Change-Id: Ic1281ba2543209eb9a4ba8d6653c3a3c537eb830 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QEvdevTouchScreenData: use a mutex locker instead of manual lock/unlock()Marc Mutz2019-05-211-4/+5
|/ | | | | | | | | | | | Extra difficulty: the lock is conditional. Not a problem with std::unique_lock, which is movable. Change-Id: Ib5515838ccb10100d5aa31163ab7f171591c04c4 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix evdevtouch input plugin crash when the device can't be openedRomain Pokrzywka2018-06-181-1/+1
| | | | | | | | | | | | | | | If a device fails to open during the plugin startup, we exit the handler constructor early and leave the d member as nullptr. However the recently added m_handler->isFiltered() call after m_handler is instantiated assumes that d is always valid, which triggers a crash in the forementionned situation. Fix it to check for d's validity first. This can occur when a device is connected then disconnected right after, so that it's gone by the time we get the notification from udev. Change-Id: Ia755868338f92b91c181be8557e06e087d70fcc6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix typosJarek Kobus2018-02-131-1/+1
| | | | | Change-Id: Id625efea998f2b4dce9970b903830dc3b3efcd3d Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-171-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/fortuneclient/client.cpp examples/network/fortuneserver/server.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h src/plugins/platforms/cocoa/qcocoabackingstore.h src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoascreen.h src/plugins/platforms/ios/qiosbackingstore.h src/plugins/sqldrivers/oci/qsql_oci.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Ia6dd2c52d4a691b671cf9a2ffca70deccece8f10
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-041-0/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/corelib/global/qglobal.h src/corelib/tools/qcryptographichash.cpp src/corelib/tools/qcryptographichash.h src/corelib/tools/qmessageauthenticationcode.cpp src/plugins/platforms/windows/qwindowswindow.h tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST Change-Id: Ib68112de985a3d714c2071f47c10e907e4f0229a
| | * Add missing math.h include (for sqrt function)Jake Petroules2017-09-221-0/+2
| | | | | | | | | | | | | | | Change-Id: Ia9cee8a941e31d71d3df6094b21d20a26f1b46f1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-261-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h src/plugins/platforms/cocoa/qcocoawindow.h src/testlib/qtestsystem.h Change-Id: I5975ffb3261c2dd82fe02ec4e57df7c0950226c5
| * | evdev*,libinput: use functor-based connectionsGatis Paeglis2017-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This results in less boilerplate code, among other benefits that come with functor-based connections. Simple expressions have been converted to use lambda. Change-Id: I6887980524027eada24beed95e6f9ba43f0fc8d5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-9/+9
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* / Fix another race in the filtered touch implementationGunnar Sletta2017-03-031-1/+1
|/ | | | | | | | The lastPoints is used outside of the mutex-locked area, so of course it cannot be a reference. Change-Id: Ic69f9acd643366f8086e96b026a47d5de40cd77b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* A few fixes to evdev touch filteringGunnar Sletta2017-01-091-3/+10
| | | | | | | | - Clamp the position to the bounding rect of the device - Send TouchRelease only once Change-Id: I8776079dbc886612e6adfb1fef5ec7cf14a8af3b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add support for filtering in the qevdevtouch pluginGunnar Sletta2016-12-131-37/+224
| | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a Kalman filter to the evdev touch plugin which samples velocity and position in x and y direction and uses this to emit touch points in sync with the application's repaint rate. The filter also allows for basic prediction based on current position and velocity estimates. Filtering is opt-in, and can be enabled by passing for instance > app -plugin evdevtouch:/dev/touchscreen:filtered:prediction=16 The logic relies on a stable QWindow::requestUpdate() and will work best in combination with QtQuick and blocking swap buffers (or equivalent). QScreen::refreshRate() will also have to be reasonably accurate. [ChangeLog][Platform Specific Changes] The evdevtouch plugin now has the option to apply filtering and prediction. Enabled by passing "filtered" as an argument. Prediction can be specified by passing "prediction=X" as an argument, where X is in milliseconds. Change-Id: I682db4386fe3a7cef8b4a08ea0d16c1491efb873 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add evdev support for FreeBSDOleksandr Tymoshenko2016-10-061-0/+4
| | | | | | | | FreeBSD 12 has evdev implementation dropin-compatible with Linux's /dev/input. Add #ifdef wrappers around platform-specific headers. Change-Id: Ia50c3f2d2e9f0f3689a92e327305d5e7547e9407 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* eglfs: Add missing virtual layout setting for DRM/KMSLaszlo Agocs2016-09-221-11/+19
| | | | | | | | | | | | | 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 <andy.nichols@qt.io>
* Rework privateFeatureLars Knoll2016-08-191-7/+7
| | | | | | | | | | | | | | | | | | privateFeature would add QT_NO_FEATURE to the DEFINES in the private .pri file, which was somewhat inelegant. Additionally, it would add the feature to the _public_ QT_CONFIG variable, which was plain wrong. Replace the implementation with the one just introduced for publicFeature, with the difference that the features are written to the private files instead. As this entirely disposes of the old system, all usages in the project files need to be replaced atomically as well. Change-Id: I506b5d41054410659ea503bc6901736cd5edec6e Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-161-2/+6
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/global/qglobal.cpp src/corelib/tools/qstring.cpp src/network/socket/qabstractsocket.cpp src/network/socket/qnativesocketengine_unix.cpp src/plugins/platforms/eglfs/api/qeglfsglobal.h Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-101-2/+6
| |\ | | | | | | | | | Change-Id: I1a63523de158757964b6fb5ea026cf69a6c5ddcf
| | * evdevtouch: Avoid crashing on exitLaszlo Agocs2016-08-101-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 26238aca8c442736f380eb523ef48468f892bdb7 causes double deletion of the QTouchDevice in case the post routine already cleaned up the list by the time the touch handler gets to do it. Just check the list of devices to see if the one we hold is still there. If not, the pointer is likely to be a dangling one so do nothing. This will avoid dying with bus error or similar on application exit. Task-number: QTBUG-51562 Change-Id: I50c1edee7405aad308274538219698388c2cc9f9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | evdevtouch: Enable touch in multi-screen eglfs environmentsLaszlo Agocs2016-08-111-4/+36
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parse the touchDevice property from the KMS/DRM config file. When all outputs have an explicitly specified index in the virtual desktop, we can set up a mapping between the device node and the screen index. It is somewhat fragile (device nodes may change, requires explicit virtualIndex properties for all outputs, etc.) but better than nothing. For example, having the screen on DisplayPort as primary and the touchscreen on HDMI as the secondary screen breaks by default because touching the second screen generates touch (and synthesized mouse) events for the first screen. Assuming the touchscreen is /dev/input/event5, the issue can now be fixed by setting QT_QPA_EGLFS_KMS_CONFIG with a configuration like the following: { "device": "drm-nvdc", "outputs": [ { "name": "HDMI1", "touchDevice": "/dev/input/event5", "virtualIndex": 1 }, { "name": "DP1", "virtualIndex": 0 } ] } Task-number: QTBUG-54151 Change-Id: If97fa18a65599ccfe64ce408ea43086ec3863682 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-111-3/+10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define and undef in src/corelib/tools/qsimd_p.h. This change is also squashed with "Fall back to c++11 standard compiler flag for host builds" which is done by Peter Seiderer. Conflicts: mkspecs/features/default_post.prf src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch src/3rdparty/sqlite/sqlite3.c src/corelib/tools/qsimd_p.h src/gui/kernel/qevent.cpp src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface_p.h src/plugins/bearer/blackberry/blackberry.pro src/plugins/platforms/cocoa/qcocoasystemsettings.mm src/plugins/platformthemes/gtk2/gtk2.pro src/plugins/styles/bb10style/bb10style.pro src/sql/drivers/sqlite2/qsql_sqlite2.cpp tools/configure/configureapp.cpp Task-number: QTBUG-51644 Done-with: Peter Seiderer <ps.report@gmx.net> Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
| * evdevtouch: ensure touchpoints released with typeB mtdev driversRomain Pokrzywka2016-03-021-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This happens in one particular case: when the touchpoint corresponding to the last slot is reported as released and a new point is reported as pressed right after, so that both events happens within a same sync. In this case, there will be two ABS_MT_TRACKING_ID events received, first with -1 to report the released touchpoint, then with a new id to report the pressed touchpoint, then the SYN_REPORT afterwards. This results in m_contacts[m_currentSlot].state being updated to Qt::TouchPointReleased then Qt::TouchPointPressed, with the former never being reported during the handling of SYN_REPORT. To handle this scenario we need to inspect m_lastContacts for a change in tracking id for a particular slot combined with a non-null state, indicating that slot has not yet been reported released and processed in the previous sync. (the state for processed released points is reset to zero at the end of the SYN_REPORT handler) Task-number: QTBUG-51563 Change-Id: I01493008cf9f267e758d974dab29556d0a1425ea Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | 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>
* | qevent.h: Add fixme comments to remove include directives for Qt 6.Friedemann Kleint2015-10-021-0/+1
|/ | | | | | | | Mark include directives in qevent.h for removal and preemptively add missing headers in code base. Change-Id: I81011d7bfad4a09d80deeda6d1bed67b5c0e63c2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Synchronize QInputDeviceManager touch device count with QTouchDeviceRomain Pokrzywka2015-09-231-23/+60
| | | | | | | | | | | | This ensures that the values and signals reported by QInputDeviceManager for touch devices always have corresponding entries in the list returned by QTouchDevice::devices(). It also adds proper QTouchDevice unregistration when the underlying input device gets removed by the evdevtouch QPA plugin. Change-Id: I7bdf2f7435c775d15bddce8ba1e731afdc1d948a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Fix evdevtouch coordinates when high DPI scaling is in useMitch Curtis2015-09-211-2/+4
| | | | | | | | Report coordinates in the native coordinate system. Change-Id: I1bfc495dd02e9a6033707bccb11066732d6cc0da Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Add a way for auxiliary threads to handle events without CoreAppThiago Macieira2015-07-181-1/+1
| | | | | | | | | | | | | | Long-lived threads started by Qt itself can now receive events even if QCoreApplication hasn't been created. This is required in all threads we start that will handle events, unless we're sure that the thread will exit before the global application object begins destruction. Otherwise, those threads will have race conditions dealing with the event delivery system trying to call the QCoreApplication::notify() virtual while the object is being destroyed. Change-Id: I27eaacb532114dd188c4ffff13d4ad2a4bb443e6 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* evdevtouch driver: fix indentation.Andreas Hartmetz2015-06-121-5/+5
| | | | | | Change-Id: If9ef172bda6488c4516a5e0577d6b233bd2ed1ad Reviewed-by: Mikko Harju <mikko.harju@jolla.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* evdevtouch: Add hotplug supportLaszlo Agocs2015-04-091-0/+665
Follow the exact same structure as evdevmouse and keyboard. We must do monitoring via device discovery just like we do for keyboards and mice. Otherwise the usage of touchscreens that connect via USB or can be turned on/off independently from the board becomes troublesome. Change-Id: I2de3b519e8d617b0612e5df486e481bbc09b9c8c Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>