summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
Commit message (Collapse)AuthorAgeFilesLines
* xcb: Drop libXi version checkLaszlo Agocs2016-10-101-20/+1
| | | | | | | | | | | | | | | ...because we cannot support it in a robust way. Querying the version via pkg-config only works when xi2 is picked up via pkg-config. Also, having a version at build time does not mean we'll have the same at runtime. Modern distros (e.g. Ubuntu 15.04 and newer) will have libXi 1.7.4 or newer. Task-number: QTBUG-56017 Change-Id: Ia4a3b0dc47f2b92bcc953f462c95602a8ea2efd6 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-08-291-13/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cf53aa21bf0f8fbd13c0ce2d33ddf7bc63d0d76a and 3aaa5d6b32130d3eeac872a59a5a44bfb20dfd4a were reverted because of reconstruction in 5.7. defineTest(qtConfTest_checkCompiler) in configure.pri is smart enough to cover the case in a9474d1260a8c8cc9eae14f2984098919d9684e5. DirectWrite: Fix advances being scaled to 0 Since 131eee5cd, the stretch of a font can be 0, meaning "whatever the font provides". In combination with ec7fee96, this would cause advances in the DirectWrite engine to be scaled to 0, causing the QRawFont test to fail. Conflicts: configure mkspecs/features/uikit/device_destinations.sh mkspecs/features/uikit/xcodebuild.mk src/corelib/global/qglobal.cpp src/corelib/global/qnamespace.qdoc src/plugins/platforms/cocoa/qcocoamenuitem.h src/plugins/platforms/windows/qwindowsservices.cpp src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp src/widgets/kernel/qapplication.cpp tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp Change-Id: I4656d8133da7ee9fcc84ad3f1c7950f924432d1e
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-181-13/+14
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbintegration.cpp Change-Id: I2d71d06a55f730df19ace0dd3304238584a0497f
| | * xcb: Add qt.qpa.input.events and guard mouse event logs tooLaszlo Agocs2016-08-151-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make mouse behave like touch and scrolling does: only do high frequency qCDebugs when the category is enabled. Switch over mouse, touch and scroll event logging to a new sub-category: qt.qpa.input.events. This way qt.qpa.input in itself behaves sanely on xcb, similarly to f.ex. eglfs, giving only the basic, but important info. Change-Id: I8dd588e72ae9d1c66096489fa3c5291f6d318ca0 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | Improve library version handlingLars Knoll2016-08-191-3/+6
|/ / | | | | | | | | | | | | | | | | | | | | Output the version as a define into the private config header as a define using a hex number. Like that we can easily do version checks on libraries using the QT_LIBRARY_VERSION(lib) and QT_VERSION_CHECK() macros. Change-Id: I6dc4ac6550886ca95c5542b6e75cd933ed079d76 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-061-7/+14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/qtestlib/tutorial5/containers.cpp examples/widgets/tools/tools.pro src/corelib/io/qprocess.cpp src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/network/kernel/qdnslookup_unix.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp tools/configure/configureapp.cpp Change-Id: I838ae7f082535a67a4a53aa13a21ba5580758be8
| * xcb: don't compress tablet motion eventsShawn Rutledge2016-05-041-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7edd10e6c added this compression feature, but it's not a good idea for drawing-tablet applications, because smooth drawing depends on receiving every movement of the stylus. Also show the device ID in qt.qpa.input.devices category logging. [ChangeLog][X11] The new X event compression feature that was added in 5.6.0 no longer applies to motion events from drawing tablets. Task-number: QTBUG-44964 Change-Id: Icd2ca8ca77d8f80c2f39160c74208db10e382501 Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* | xcb: eradicate Q_FOREACH loops [needing qAsConst()]Marc Mutz2016-04-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | ... by replacing them with C++11 range-for loops. To avoid detaches of these mutable Qt containers, wrap the container in qAsConst(). Saves more than 2KiB in text size on optimized GCC 6.0 Linux AMD64 builds. Change-Id: I9610e711edc01d2a1ba19fef65d6b000ffc77255 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | xcb: don't iterate over .keys()Marc Mutz2016-04-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | ... iterate over the container itself instead. Avoids temporary QList creation as well as the lookup cost when actually calling value(key). Saves more than 1KiB in text size on optimized GCC 6.0 Linux AMD64 builds. Change-Id: If4b2fb7eada0e9cde72ab101a5f6e5cb1ba64054 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | xcb: remove tablet->mouse event synth; harmonize handle/report methodsShawn Rutledge2016-04-191-32/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The synthesis of mouse events for unhandled tablet events is now in cross-platform code, so the platform plugins don't need to do it. xi2HandleTabletEvent's signature included an eventListener which is no longer needed; removing it makes it look needlessly inconsistent with the signature of xi2ReportTabletEvent; and while we're at it, might as well make the events const and deal with the repercussions. Task-number: QTBUG-47007 Change-Id: I0f76c8ed2d2b0baed0652bc68286f1734b8b72ff Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-111-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * xcb: mark mouse events from tablet devices as synthesizedShawn Rutledge2016-03-091-1/+1
| | | | | | | | | | | | Task-number: QTBUG-51617 Change-Id: Ic1d258c56165947ff821b1bf4d044bcf29b41a3b Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-241-0/+1
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/plugins/platforms/windows/qwindowsfontengine.cpp src/plugins/platforms/windows/qwindowsnativeimage.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I649b32b260ce0ed2d6a5089021daa0d6a8db85f7
| * xcb: include <cmath>Shawn Rutledge2016-02-191-0/+1
| | | | | | | | | | | | | | Fix trouble compiling with gcc 4.4.7 on Centos 6 Change-Id: Id81bd570e896507a07388257c4f75f80b4b468fd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-111-18/+79
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemwatcher_win.cpp src/corelib/plugin/plugin.pri src/plugins/platforms/cocoa/qcocoaaccessibility.mm tests/auto/corelib/tools/qlocale/tst_qlocale.cpp Change-Id: Id6824631252609a75eff8b68792e4d10095c8fc1
| * xcb: XInput2 fixes, enter/leave event fixesBłażej Szczygieł2016-02-061-13/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | Added enter/leave event handling in XInput2 to avoid problems with those events when the mouse is grabbed. This commit amends: 53d289ec4c0f512a3475da4bbf1f940cd6838ace This commit amends: ed2e15780385f7cf0a0d3aedc9cb2059d470bd58 Task-number: QTBUG-50340 Change-Id: I7a120b46daa4f8fa4c218346273ae90b6abfa156 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * xcb: Take into account the orientation of touch pointsAlexander Volkov2016-02-031-5/+38
| | | | | | | | | | | | | | | | | | | | | | Add support for ABS_MT_ORIENTATION value. Linux kernel multi-touch protocol allows it to be in a wide range: https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt, but we need only to know whether the touch point rect is rotated by 90 degress. So adjust the angle to the closest axis. Change-Id: Ie20725dc4bef509e2f9b19571efc69502d00c019 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-211-0/+4
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice_p.h src/corelib/kernel/qvariant_p.h src/corelib/tools/qsimd.cpp src/gui/kernel/qguiapplication.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp Change-Id: I742a093cbb231b282b43e463ec67173e0d29f57a
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2016-01-191-0/+4
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/common/atomic64/atomic64.cpp configure src/3rdparty/forkfd/forkfd.c src/corelib/io/forkfd_qt.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp tools/configure/configureapp.cpp Change-Id: Ic6168d82e51a0ef1862c3a63bee6722e8f138414
| | * Fix XI2 smooth scroll with inverted directionMaxim Mikityanskiy2015-12-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When touchpad scroll direction is inverted, verticalIncrement and horizontalIncrement of scrollingDevice are negative, and rawDelta remains unfilled. It leads to pixelDelta.isNull() being true in wheel event handler even when XI2 smooth scrolling is available on the system. Fix that and fill rawDelta with correct values when inverted scroll direction is used. Change-Id: I9c0bdbad2c6b9bbed765eaa895dca300c5c70e86 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | | 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>
* | xcb: don't select XInput events on the root windowShawn Rutledge2016-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we select XInput events, then when the mouse is clicked, there will not be a fallback to a core pointer event. But a typical Qt application doesn't own the root window. If the window manager (such as OpenBox, Awesome or fvwm) relies on receiving core pointer click events, e.g. to show a desktop menu, then each time a device is hotplugged while a Qt application is running, we would select XI2 events and thereby prevent the window manager from receiving them. QDesktopWidget's native window is added to m_mapper, even when it isn't mapped. Then after hotplugging there's a hierarchy event, and that calls xi2Select for every window in m_mapper. The assumption with this patch is that the root window does need to be in m_mapper in case the QDesktopWidget is shown (that was done already in Qt 5.1: fca94fa5ed8321e84e7b0ff515620fbb901db545), but xi2Select must avoid selecting XI2 events on it to fix this bug. Task-number: QTBUG-49952 Change-Id: I5c160e879d93fadfce14120ef2e89a4f71d4f599 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | XCB: prevent a fp division by zeroGiuseppe D'Angelo2015-12-101-4/+7
| | | | | | | | | | | | | | | | | | | | | | For certain devices vci->resolution is zero, which causes a SIGFPE if FE_INVALID exceptions are enabled. Try to prevent that. Task-number: QTBUG-42717 Change-Id: I388735f5dfb6218496787dbb74cf0c0f43cc928f Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru> Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | xcb: fix touchscreen input with certain capabilities onlyWolfgang Bremer2015-09-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | Touch screens without the "Abs MT Position X" but "Abs X" capability weren't detected correctly so far. This patch fixes the detection and enables these tochscreens. Change-Id: I32fdb4d56c106717c90904a6632c2838bd55a255 Task-number: QTBUG-48279 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | xcb: get Genius/Waltop tablets working againShawn Rutledge2015-09-241-0/+6
| | | | | | | | | | | | | | | | It was working at some point, but not in 5.5.0. Task-number: QTBUG-48370 Change-Id: I8a0e09d4dfa9ace3d69c10c5f88129958d226a9a Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | xcb: Compress mouse motion and touch update eventsGatis Paeglis2015-09-221-60/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current version of the mouse motion event compression algorithm does not work with certain configurations - situations where we get one XCB_GE_GENERIC event between every XCB_MOTION_NOTIFY event. The new implementation tries to be less fragile. The previous approach checked "is *the next* event the same type as the current event", the new check asks "have we buffered more events of the same type as the current event". We buffer events of the same type only when the main thread is unresponsive. This patch adds event compression for XI_TouchUpdate in addition to the fix for motion even compression. Change-Id: Ie215eb5969e2060e463ebe48e3d3007390a30deb Task-number: QTBUG-40889 Task-number: QTBUG-47069 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-08-261-9/+10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/snippets/code/doc_src_qmake-manual.pro qmake/doc/src/qmake-manual.qdoc src/corelib/io/qstorageinfo_unix.cpp src/corelib/tools/qbytearray.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/corelib/io/qprocess/tst_qprocess.cpp tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp tests/auto/network/access/qnetworkreply/BLACKLIST Change-Id: I9efcd7e1cce1c394eed425c43aa6fce7d2edf31c
| * xcb: send QTabletEvent before QMouseEventShawn Rutledge2015-08-191-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | It was a regression: drawing applications which can handle both mouse and tablet events should not need to wait to see whether a mouse event will be followed by a corresponding tablet event. The tablet event is preferred because it has all the tablet parameters (pressure etc.) Also, show the timestamp of each mouse event in the log message, which helps to verify the correspondence. Task-number: QTBUG-47702 Change-Id: I9e832c19de935ec1243138eb4c1484284f61cbfc Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | xcb: set QTabletEvent's timestamp from the window system eventShawn Rutledge2015-08-241-9/+8
| | | | | | | | | | | | | | | | | | | | The intention is for it not to include any delays that Qt's event processing has introduced. And we are already doing it this way for touch and scroll events. Task-number: QTBUG-39459 Change-Id: Ie01cc2f8c6290ab66ef1b9180471afaa3da2e9da Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devFrederik Gladhorn2015-08-061-16/+17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/global/qt-cpp-defines.qdocconf src/3rdparty/forkfd/forkfd.c src/corelib/codecs/qtextcodec.cpp src/corelib/kernel/qmetatype.cpp src/corelib/tools/qset.qdoc src/gui/accessible/qaccessible.cpp src/gui/image/qpixmapcache.cpp src/opengl/qgl.cpp src/tools/qdoc/generator.cpp src/widgets/kernel/qwidget.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
| * xcb: Make it compile on systems with xinput2 < 2.2Martin Koller2015-07-301-11/+13
| | | | | | | | | | Change-Id: I7e98d3540cd7717ac8af8d1993618d18320f811a Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * xcb: fix tablet proximity againShawn Rutledge2015-07-281-5/+4
| | | | | | | | | | | | | | | | | | Patch 53d289ec4c0f512a3475da4bbf1f940cd6838ace caused it not to select property change events, which are needed separately for each tablet device. It's not enough to select them on the master device. Change-Id: Ibb6c7990d2edd865019eacfa7eed4bf818f7557e Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Remove QT_DEVICE_PIXEL_RATIO support from xcbPaul Olav Tvete2015-07-291-10/+6
|/ | | | | | | | It will be reintroduced as a cross-platform feature. Task-number: QTBUG-46615 Change-Id: Ia6d03275018b2a25ebed438fe51f15e491f1c3ff Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* xcb: Map touch points to screen coordinatesAlexander Volkov2015-06-191-3/+5
| | | | | | | | | | | | Add QPointF overloads for QXcbScreen::mapToNative() and QXcbScreen::mapFromNative(). Use mapFromNative() to map the coordinates of a touch point to screen coordinates as we do it for mouse events. It fixes touch events when QT_DEVICE_PIXEL_RATIO is set. Change-Id: Id8362cda526e0f837b76899eba21d9bfc895988c Task-number: QTBUG-44840 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* xcb: Ignore emulated pointer eventsAlexander Volkov2015-06-081-1/+1
| | | | | | | | | X server sends emulated XI_Motion events before each touch sequence. Filter them out to avoid a mess with mouse events synthesized in QGuiApplication. Change-Id: Ic919c86b41e2467a594de7c903cc0f3fc88a6804 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* xcb: Track touch points on a per device basisAlexander Volkov2015-06-031-5/+6
| | | | | | | | | Until now there was no connection between the tracked touch points and the touch device. So the touch point for one device could be updated by the touch event from another device. Change-Id: I09fcf03a171cc361c6b5b4995758aa53d29ff414 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Don't assign iterator to const_iteratorSérgio Martins2015-06-021-2/+2
| | | | | | | | It should also be possible to use QT_STRICT_ITERATORS in Qt's own code base Change-Id: I0914db480d4d2b06e71e3a2588163efdd3ff6d27 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* xcb: Use XIGrabDevice instead of xcb_grab_pointer with XI 2.2Laszlo Agocs2015-06-011-147/+286
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to using the pointer events from XI2 when touch is available (i.e. version is >= 2.2). This allows us to select and grab the button and motion events together with the touch ones. This prevents the issue of not getting touch events when grabbing via the plain xcb functions. To prevent touch sequences from being replayed after ungrabbing (for example after dismissing a popup that caused a grab), we try to accept touches via XIAllowTouchEvents. Unfortunately this leads to a deadlock and therefore we can only do it when we know we have a new enough libXi. This is a configure time check which is not ideal since the system on which apps run can have a newer libXi than the machine that did the Qt build, but seems like the best we can do. The environment variable QT_XCB_NO_XI2_MOUSE can be set to 1 in order to prevent processing mouse events through XInput. This restores the old behavior with broken grabbing. [ChangeLog][QtGui] Pointer event delivery on X11 is now done via XInput 2.2+ when available. Done-with: Michal Klocek <michal.klocek@theqtcompany.com> Done-with: Alexander Volkov <a.volkov@rusbitech.ru> Task-number: QTBUG-43525 Task-number: QTBUG-45054 Task-number: QTBUG-30417 Change-Id: I7cb2002b31bef4cd527aa427549dcf2d5467968e Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* xcb: Properly calculate the size of the touch rectAlexander Volkov2015-05-231-14/+5
| | | | | | | | | | ABS_MT_TOUCH_MAJOR is given in surface units rather than in finger units. Also it's not the width of the touch rect but the length of the major axis of the contact. Currently we don't support the orientation of touch rects, so report square rects with side length of ABS_MT_TOUCH_MAJOR. Change-Id: I16c861f30128438ec4a1cae983700f8da4b7b4b7 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* xcb: Fix FP1616 to double conversionAlexander Volkov2015-05-141-1/+1
| | | | | | | | | | | We should divide the fractional part of the FP1616 value by 0x10000 instead of 0xFFFF, otherwise 1.FFFF will be converted to 2.0. And right-shifting the integer part by 16 is equal to dividing it by 0x10000. So just divide the whole FP1616 value by 0x10000. Change-Id: Ia89a274b81be9cf502e1f311f696a610a7f37d7f Task-number: QTBUG-45378 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Fix compile error in XCB when XInput version < 2.2Kati Kankaanpaa2015-05-121-0/+2
| | | | | | | | | Add version guards to prevent compiler error: 'XITouchClass' was not declared in this scope in systems having XInput version < 2.2. Change-Id: Ib1308f29ef97288eb994ab8bdd668199ca2ee1d7 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Decide whether to synthesize mouse events on a per device basisAlexander Volkov2015-02-251-4/+7
| | | | | | | | | | | | | | | | | | | | | Currently Qt uses the QPlatformIntegration::StyleHint SynthesizeMouseFromTouchEvents to check whether to synthesize mouse events from touch events. But not only platform plugins can produce touch events, they can be created by e.g. QTest::touchEvent() and in this case we almost definitely need synthesizing regardless of the platform. This commit introduces a QTouchDevice::MouseEmulation capability which replaces use of the QPlatformIntegration::SynthesizeMouseFromTouchEvents. So it's possible to pass QTouchDevice without this capability to QTest::touchEvent() and be sure that mouse events will be synthesized. Notice that touch pads always emulate mouse events. As a result we can activate some tests which were disabled for specific platform configurations by commits 6c1670d8c273819435867c42725c0db0eee597dc and e9760f1559361c39f269fb89f1ebd01f6ee8378d. Change-Id: Idc82fa4007a095fc1cb5934979361b0023d2b793 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-10/+66
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/xml/htmlinfo/simpleexample.html examples/xml/rsslisting/rsslisting.cpp qmake/generators/win32/msbuild_objectmodel.cpp src/3rdparty/harfbuzz-ng/src/hb-private.hh src/corelib/global/qlogging.cpp src/corelib/io/qstorageinfo_unix.cpp src/corelib/thread/qwaitcondition_unix.cpp src/gui/kernel/qguiapplication.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp src/testlib/doc/src/qt-webpages.qdoc tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: Ib272ff0bc30a1a5d51275eb3cd2f201dc82c11ff
| * Listen to XI2 deviceChanged events to reset last positionAllan Sandfeld Jensen2015-02-091-10/+66
| | | | | | | | | | | | | | | | | | | | Some drivers appears to reset their scroll positions when make the primary point. This patch listens for the device changed event and uses the information in it to update the position. Task-number: QTBUG-40829 Change-Id: If354dfde6300ceb2b81be14ea24594ab0658a6aa Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | xcb: Check for the presence of XInput 2.2 before selecting touch eventsAlexander Volkov2015-02-171-15/+17
| | | | | | | | | | | | Change-Id: I5309f9cdaadb87e0a577a0701d2c100d29525424 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.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>
* | Ensure null pointers are not added to QXcbConnection::m_touchDevicesSandro Mani2015-02-041-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | QXcbConnection::touchDeviceForId attempts to retrieve an existing XInput2TouchDeviceData from m_touchDevices via QHash::operator[]. If m_touchDevices does not contain the specified XInput2TouchDeviceData, QHash::operator[] adds a default constructed value (i.e. a null pointer) for the specified id. This null pointer is not removed from m_touchDevices if the condition "nrDevices <= 0" is true below. This causes a null pointer dereference later on in QXcbConnection::finalizeXInput2. Change-Id: Icd3352417047c4b35d56db2d9f51e3fa1d859e9d Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Avoid warning about QString from char in xcbLaszlo Agocs2015-01-151-1/+1
|/ | | | | Change-Id: I013f0caa8aba7fef07c7dbe90ed01dfb85347223 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Gabriel de Dietrich2014-09-291-1/+3
|\ | | | | | | | | | | | | | | Conflicts: src/network/socket/qnativesocketengine_unix.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I6f1aa320d5ca66cd92d601a95885aeaab0abb191
| * XCB: fix a memory leakGiuseppe D'Angelo2014-09-221-1/+3
| | | | | | | | | | | | | | | | An early return caused a leak of a new'd allocated object. Change-Id: I9fbc37238dd49066d24363a2e8ee8bf35b155301 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>