aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickwindow.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.7' into 5.8Simon Hausmann2016-11-151-2/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4string.cpp The conflict resolution for qv4tsring.cpp is to essentially omit the change of commit 64714ea431f2fd355ed27edc69dba4e992511e75 as the code in 5.8 already uses the add/mul_overflow functions. This merge also reverts commit f4ac007f4a19bc095ff15d415a6629986de78e49 as we can deal with dead store elimination now. Change-Id: Iee08c87cbe1a2ff23a73ce621d56262b4e007c56
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-11-151-2/+4
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qmldevtools/qmldevtools.pro tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp Change-Id: I12255c16716bd8a74e7047cdb1f9302a4d1ea827
| | * Add checking "before" as child nodeInhye Seo2016-11-091-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qquickitem_before_paintNode returns the transform node for the rectangle as child node. But the node has no parent. It leads to following assertion case at QSGNode::insertChildNodeAfter(). But, I tested it in release mode, so no assertion happened. So, Some node not be able to add group node from this cause. Task-number: QTBUG-56657 Change-Id: Ie032dc6c56984bcb58cfcd348ff532f56e39e5b8 Reviewed-by: Inhye Seo <inhye.seo@lge.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8v5.8.0-beta1Liang Qi2016-10-271-0/+1
|\| | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicktextedit/BLACKLIST Change-Id: I0b9e5bea5da5d2666887c202e62d889b4aa56900
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-271-0/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickwindow.cpp tests/auto/quick/qquicktext/BLACKLIST tests/auto/quick/qquicktextedit/BLACKLIST Change-Id: I8bd68b0b5e853b7908791d2cbddd18dd527c76ae
| | * QQuickWindow: don't discard timestamps for wheel eventsJ-P Nurmi2016-10-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Noticed while debugging QTBUG-56075 on XCB. QQuickFlickable did not receive timestamps for wheel events provided by XI2. This alone does not fix the flicking speed issue with high-precision trackpads, but is needed to be able to calculate the appropriate velocity. Task-number: QTBUG-56075 Change-Id: I458e6302aee72863cdc1f8e8f7d99449016905a9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Fix mouse and touch grabbing issuesFrederik Gladhorn2016-10-041-12/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We keep track of the touch device and point ID, but didn't use them when queried for the mouse grabber. When setting the grabber, also take touch into account. Qt Location's touch/mouse handling, when it called the grab functions was not working correctly, because in QQuickWindow, we'd check for the old grabber and due to not checking the device/id, we'd get the wrong item, which would then result in the ungrab function not being called. When some item steals the grab for a touch point that was previously accepted as a synthetic mouse point, there was a high chance we would fail to deliver a mouse ungrab event. Make sure to ungrab the mouse as soon as we find any point with the corresponding ID. In addition, the multi point touch area tried to grab ids which were invalid (-1), avoid that. Task-number: QTBUG-55229 Task-number: QTBUG-56213 Change-Id: I73e4587bf4f94a65d88c5b60d93bc07743512e56 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Fix behavior of Flickable::setPressDelayFrederik Gladhorn2016-10-041-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | This expands the test and fixes the code. Before this patch, items would see the press event, but get the press stolen again immediately. Change-Id: Iece1d5ffbc09a98fb4bec8d810c7ad78b0f50afe Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Fix release event delivery in deliverTouchAsMouseFrederik Gladhorn2016-10-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally in the complicated version of this part of the code, the event would always end up in the right place, since the grabber was kept and events delivered reliably. Now we take device and point ID for the grabs into account. When delivering a mouse event from a touch, we would clear the pointer device and ID before trying to send the release, which resulted in the release event never being delivered. Change-Id: I9bc1b2a795023740f8fe3961d779bc8bff0dc35e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Don't crash when delivering stationary touchpoint as mouse releaseShawn Rutledge2016-09-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickPointerTouchEvent::touchEventForItem() can return a nullptr so we have to check for that wherever we use it. In this crash scenario while doing some kind of touch gesture it gets delivered as a synth mouse event to a custom item. When you release the last finger (or release multiple fingers simultaneously), touchEventForItem() returns nullptr because the fingers were no longer moving before the release, and QQuickWindowPrivate::deliverTouchAsMouse() didn't check for that. Task-number: QTBUG-56090 Change-Id: I7ada1f82711296722226fdc06d9c5add2422335b Reviewed-by: Paolo Angelelli <paolo.angelelli@theqtcompany.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-211-0/+9
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmltypeloader.cpp Change-Id: I07647700fc86764c95a5ef95c568e700a70fe45f
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-161-0/+9
| |\| | | | | | | | | | Change-Id: Ib45654e3e79087da4754377f0d78b70c44ed4695
| | * Propagate window enter event as hover enter event in QQuickWindowEike Hein2016-09-151-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickWindow currently propagates window leave events as hover leave events to its content item, but it does not propagate window enter events as corresponding hover enter events. Instead, hover enter is only triggered implicitly by mouse moves. This can cause problems when there is no mouse movement inbetween the window being entered and a subsequent button press event. A common example where this occurs is dismissing a mouse-grabbing popup window (e.g. a QMenu) by clicking outside the popup, and then clicking in the same spot that was clicked to dismiss the popup. Without this patch, hover state is not realized until movement occurs, so there may be no no visual feedback and code that needs to update state based on what is being hovered prior to handling a press event can't work correctly. This patch synthesizes a QHoverEvent and delivers it in response to QEvent::Enter, similar to how QEvent::Leave is already handled. QWidget handles this correctly via QWidget::enterEvent. The equivalent in Qt Quick is QQuickItem::hoverEnterEvent, ultimately called with the synthesized event. The patch also updates the touchmouse::hoverEnabled autotest. Due to the window enter event now being handled correctly, exitSpy2 would run up a count() of 2, as the cursor was not in a neutral position after previous test cases. The change makes sure the cursor is in a neutral position before test case activity. [ChangeLog][QQuickWindow] The relevant child item is now sent a hover event when the window receives a QEnterEvent, making sure hovering is recognized without waiting for mouse movement. Change-Id: If0586f6cd971df0dfc266bb1a39c9cdb184fd286 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Fix mouse area pressed after removal of pre-grabFrederik Gladhorn2016-08-241-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt Quick used to actively "grab" the mouse before delivering events, making the code more complex than necessary. Some items came to rely on the behavior and now lack the ungrab event. This is triggered when inside the delivery of a mouse event, some other item grabs the mouse. If the mouse grab changed to an item that was not the target of the original delivery, the grab must have been stolen, so call mouseUngrabEvent in this case. Test case by J-P Nurmi. Task-number: QTBUG-55325 Change-Id: I2f0ac9d8aed1415662196070fb763f2752004d22 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Quick: fix incorrect usage of 'range for' with Qt containersAnton Kudryavtsev2016-08-201-6/+8
| | | | | | | | | | | | | | | | | | | | | Also port remaining foreach to 'range for'. Change-Id: I20296bb3bb6d63f144ebddaba02cabeb16b7d734 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Quick: use const (and const APIs) moreAnton Kudryavtsev2016-08-121-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | For CoW types, prefer const methods to avoid needless detach()ing. Change-Id: I270cdc6eb8c5946f5c20b379bbb7c60f0ba518eb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Remove impossible conditionFrederik Gladhorn2016-08-081-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | We don't pre-grab any more. The first if checks for touchMouseId==-1. Then we only set touchMouseId if the event was accepted. Change-Id: I507c72930af958732ec8f4ef8ea2750ce3ea8f2d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | QQuickWindowPrivate::deliverTouchAsMouse: don't pre-grabFrederik Gladhorn2016-08-051-3/+2
| | | | | | | | | | | | | | | Change-Id: I127d3e6dafbe4207941aef3f507b25c2cb7a251b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Invalidate QQuickPointerEvents after deliveryFrederik Gladhorn2016-08-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | We must not hold on to events after delivery, so better set them to nullptr. On the other hand the grabbers need to be persistent, but that's achieved since the points are copied anyway. Change-Id: I0c01ee2ec6c9238c6594f0b7e2a9533185070667 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | QQuickEventPoint: replace Qt::TouchPointState with State enumShawn Rutledge2016-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This allows extension later on, and makes it clear that the state is for any kind of point, not just a touchpoint. Change-Id: I1f8aaa01ea65ac1731645129fedcf7a51ee66e77 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Pass pointerEvent into QQuickWindowPrivate::deliverTouchAsMouseFrederik Gladhorn2016-08-041-5/+8
| | | | | | | | | | | | | | | Change-Id: I53c737498f27db3e1fea4fd2f9e10f75a2b48d14 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Remove bogus claimFrederik Gladhorn2016-08-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | There cannot be any change in grabber, when calling QCoreApplication::sendEvent. This kind of surprise take-over should be done through childFilterMouse which this function is already a part of. Change-Id: I10c3aad3a83b0045e3c407b936e39ba589e4c6d1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge branch 'dev' into wip/pointerhandlerFrederik Gladhorn2016-08-041-14/+25
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickwindow.cpp: we need the fix for QTBUG-31861 but now using QQuickPointerMouseEvent src/quick/items/qquickwindow_p.h: hover events need timestamps (e4f7ab42) tests/auto/quick/qquickwindow/tst_qquickwindow.cpp: added test for QTBUG-31861 Change-Id: Ic120513b69b318df3ba62d8174c276cbf6b7b55e
| * | | Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-021-14/+22
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickshadereffect.cpp 5.7 had a bug-fix in code dev has replaced wholesale. src/quick/items/qquickwindow.cpp src/quick/items/qquickwindow_p.h One side changed a method's signature; the other side renamed a method declared adjacent to it and changed some code using it, moving some from the public class to its private partner. tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp One side added a blank line before a comment the other re-wrote. Kept the re-write, killed the stray blank. .qmake.conf Ignore 5.7's change to MODULE_VERSION. src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qqmlpropertyvalidator.cpp 5.7 changed code in the former that dev moved to the latter. Reflect 5.7's changes there, adapted to dev's form. src/qml/qml/qqmlobjectcreator.cpp One side added new QVariant types; the other changed how it handled each type of QVariant (without git seeing any conflict); adapted the new stanzas to work the same as the transformed ones. tests/manual/v4/test262 dev had a broken sha1 for it; so used 5.7's 9741ac4655808ac46c127e3d1d8ba3d27ada618e Change-Id: I1fbe2255b97d6ef405cdd1d0cea7fab8dc351d6f
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-011-0/+6
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp tests/auto/quick/qquickitem/tst_qquickitem.cpp Change-Id: If261f8eea84dfa5944bb55de999d1f70aba528fd
| | | * Fix QQuickItem's setAcceptedMouseButtons functionDan Cape2016-07-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using setAcceptedMouseButtons to only allow the LeftButton, the user can click the LeftButton and while still holding it press the RightButton. There would be a press event sent for both. To resolve this, a check needed to be added to ensure the acceptedMouseButtons are checked when a second press comes in. [ChangeLog][QtQuick][QQuickItem] Fixed issue with mouse button events being sent even when they were disabled by setAcceptedMouseButtons. Change-Id: I064f3ff56ede12b1572e172be326eb337e280750 Task-number: QTBUG-31861 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-151-13/+15
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quick/demos/photoviewer/deployment.pri One side made it redundant; the other removed part of it; remove it all ! src/quick/scenegraph/util/qsgatlastexture.cpp One side changed a preprocessor condition, the other a code condition, on adjacent lines; keep both changes. tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp One side changed a condition, the other the content of its block; keep both. Change-Id: Idb8937f92a7edb28212449dfe0c5cfdb8e6de986
| | | * QQuickWindow: Fill out timestamps in QHoverEvents sent to QQuickItemsDaniel d'Andrada2016-07-121-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-54600 Change-Id: Ie24c44e2f68aae55ff1146c13c3dfc25349b7a29 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | Move setting lastMousePosition out of QQuickWindowPrivate::translateTouchEventFrederik Gladhorn2016-08-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This setting of lastMousePosition is highly suspicious and was nicely hidden. Make it visible, then a check can be added, for example it shouldn't be set if we have a real mouse at the same time as touch events, so a check for the right device is certainly in order. Also remove a redundant .toPoint() which would result in converting to QPoint which was then cast back to QPointF. Change-Id: I8333cf366ce623f3beb20f556f31b50904c0112d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | Assign QPointF() to lastMousePosition to resetFrederik Gladhorn2016-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I446f7311d2deddba102613b33e391acda48efac4 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | Remove touchMouseIdCandidatesFrederik Gladhorn2016-08-031-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The set was there to protect from assigning to touchMouseId twice. That seems rather redundant: either something can become the touchMouseId, because touchMouseId is -1, or well, it can't. I suspect this set was needed before, when pre-grabbing was still there. Change-Id: I56d2c86cd13a3f6ec129d27ff8d5f7edf35df7cb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | Remove outdated commentFrederik Gladhorn2016-08-031-1/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: I538915e2adb6758583c736be9147c27fd5130244 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | Pass pointer event into sendFilteredTouchEventFrederik Gladhorn2016-08-031-80/+8
| | | | | | | | | | | | | | | | | | | | Change-Id: Id8709b45af135df5f16558c4b611409bc134ea63 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | Remove touch handling from QQuickWindow::sendEventFrederik Gladhorn2016-08-031-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is dead code which doesn't fulfill any purpose. It is actively harmful in that it doesn't do what it promises: it never sends the event but only does the filtering. Change-Id: If2eda1bcd1a219dbdb76e777d52146814cc436be Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | deprecate QQuickWindow::sendEvent and minimize the internal usagesShawn Rutledge2016-08-031-49/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems to be necessary only to handle parent-filtering cases. Meanwhile, filtering out certain events while sending others through via QCoreApplication::sendEvent() also seems questionable, so let's see if anything breaks if we allow all events through. And I can't think of a use for it in application code, so let's deprecate it and hope that we can remove it in Qt 6. [ChangeLog][QtQuick][QQuickWindow] QQuickWindow::sendEvent() is deprecated. Use QCoreApplication::sendEvent() directly instead. Change-Id: Ide8004bcb0003f14cf176d6d7e80a9af8f442813 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | | Start to unite press event delivery for touch and mouseFrederik Gladhorn2016-08-021-36/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Needs some cleanup, but seems to work now. Change-Id: I579009648d874c9293a0ebb3d7809536420b5574 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | add QQuickPointerEvent::setAccepted/isAccepted to avoid mouse/touch castingShawn Rutledge2016-08-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes deliverMouseEvent() slightly more generic: the only place we now care about it being a mouse event is to be able to call sendEvent() with the original event. Change-Id: Ibd1660bb45b6f8b3a5b9926aeb3dc85ff2e41d0f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | | Use public function for QQuickItem::acceptedMouseButtonsFrederik Gladhorn2016-08-021-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no point in calling the privat if the public version does exist and returns the same. Change-Id: Ia079af4ba84a631b840e40e2a76f1fd911afcfbd Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | Optimize QQuickWindowPrivate::deliverPressEvent slightlyFrederik Gladhorn2016-08-021-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling the merge function at least one time less often saves some vector moving around. Change-Id: I4573fa4cb34398fa6297786558a21b780429d121 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | QQuickWindowPrivate::deliverMouseEvent: use the event's grabberShawn Rutledge2016-08-021-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A tiny step toward delivery unification: the grabber in the given event (without requiring it to be a mouse event) should be the same as the current mouse grabber. Change-Id: Ice5530d01d999be78b5d10b509f669f247d4bae9 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | | Stop copying mouse events when delivering themFrederik Gladhorn2016-08-021-17/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce allocations of events, just refill the local pos. Change-Id: I2948faf0e302bff315e482f2c1432fe0def19bc5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | Rename translateTouchToMouse -> deliverTouchAsMouseFrederik Gladhorn2016-08-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This function actually sends the event, not just "translates". Change-Id: Ia9b4d136f8f6c214f52beacf89cdf686e4617570 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | Rename touchEventAccepted to match its purposeFrederik Gladhorn2016-08-011-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bool is used to check if the touch or mouse event is accepted, so just call it eventAccepted. Change-Id: If22c9f759411edb9357a68273bcaa44364acc4e1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | Deliver touch points in defined orderFrederik Gladhorn2016-08-011-28/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtQuick] Touch events are now delivered in a well defined order: New touch points are delivered first to items under the finger which was first touching the screen. Then to items that are under the second finger and finally to common ancestors. This means that items that are "on top" will get a chance to grab touch points before any items in the background. Change-Id: Icf9a163c0183437cdb79040b8513fd746c3a6a44 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | Add mergePointerTargets to create pointer delivery listFrederik Gladhorn2016-08-011-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code joins lists of "target item" which are joins of where several touch points should be delivered. Change-Id: I15ab4b7f70b8930d15368bf4cba0893ab339fa2a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | Pass PointerEvent into deliverMouseEventFrederik Gladhorn2016-07-311-7/+6
| | | | | | | | | | | | | | | | | | | | Change-Id: Ib9e1748cea24851ecc369da5d658654341d291ac Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | | Touch event delivery: split into press and update deliveryFrederik Gladhorn2016-07-291-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gets rid of iterating through all possible receivers when touch events get delivered, the event gets sent directly to the right item. Change-Id: I341bbdc095744a99c6c4011f07d5f5a239b7fe46 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | | Accept points inside QQuickPointerEventFrederik Gladhorn2016-07-291-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before the points for move events were not accepted, which is inconsistent. We know that we can stop delivering as soon as all points are accepted. Change-Id: I48d286be715eca16771e9ec0b107398fafb94194 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | | Simplify keeping track of lastMousePositionFrederik Gladhorn2016-07-281-3/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I19436b4c6cd0dc8a427d763fd2fc0b230a492df8 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | | Move mouse release handling into deliverMouseEventFrederik Gladhorn2016-07-281-7/+5
| | | | | | | | | | | | | | | | | | | | Change-Id: I4071a5fa217230883b6b99b2f37cdcd459aa14c5 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>