| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
This reverts commit ee6b07b3ce8ba80632868181d45d96253acb1064.
This is to be integrated after the qtlocation change to remove the
dependency on this private function.
Task-number: QTBUG-57253
Change-Id: I756681fb2595d1326b7e5206bac57ccc318c0a46
Reviewed-by: Liang Qi <liang.qi@qt.io>
|
|
|
|
|
|
|
|
|
| |
This can be reverted as soon as the relevant qtlocation change is
integrated.
Task-number: QTBUG-57253
Change-Id: I72b71f61ba8fe421ac57c963801176098fe9f11c
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
|
|
|
|
|
|
|
|
|
|
|
|
| |
With two or more windows, if events are being delivered to each, the
grabbers can be different in each. We need unique instances of the
QQuickPointerEvent objects for each window to avoid losing the grab state in
the parent window while delivering a synthesized event to a subwindow, for
example.
Change-Id: I51da1212d573853969e32ad78f5b219d979a8a5c
Task-number: QTBUG-57253
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
| |
Change-Id: Id0ea0037db4cc3878ae2f75109aa3a7daa120189
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This will make it easier to change or extend further, in case some
future device has some sort of unique serial number which does not
fit in a quint64.
Task-number: QTBUG-54616
Change-Id: I8f20b13d75b937fce6a66653476d0d25f2abf34b
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Several people agreed that the name was confusing and that this one
is better.
Task-number: QTBUG-54616
Change-Id: Ie9d24fc6e233949be36c8b6ee2650080a8a3506e
Reviewed-by: Sune Vuorela <sune@vuorela.dk>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
| |
The next step is to rename it, but we do this first to avoid breaking
CI while it's renamed in qtbase.
Task-number: QTBUG-54616
Change-Id: Iae3a098b9ab5571599af838d19b1869b84b2165f
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: I35bd1aa524705c8c6541428b2737b992de2ad05d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
| |
Change-Id: I604fe1470bfab831e31d129d3b734213273fc333
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
| |
The mouse pointer event doesn't need it.
Change-Id: I68999f79a0d979cf414b11a2e6b4863df1a1e817
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
| |
Change-Id: I5f58f53a10b11906c1f784f1cab96ec761d8d588
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| | |
Touching this header results in rebuilding a lot of stuff, and
these functions are likely to need further modification.
Change-Id: Idc99255fc8e20a190c31b5e3d47dd005f4573434
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ib2c99d25e5922c5146b82d1e00c9e97b621eaa81
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Id8709b45af135df5f16558c4b611409bc134ea63
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Makes it possible to assign QQuickPointerDevice from the PointerEvent.
Change-Id: Ica5182175eea210f5fe090807ed54467be11b031
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
Reduce allocations of events, just refill the local pos.
Change-Id: I2948faf0e302bff315e482f2c1432fe0def19bc5
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Accessing the grabbers was always dangerous. The present code only works
because it iterates over all current QQuickItems and doesn't even try to
deal with things being deleted inbetween.
Change-Id: Id85791dcbd87ec8c5027f9c1376cb39e5779cabe
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ied358da23baabfad7e1f75e48a459f1bd5425102
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
We keep track of the state inside the individual points, simplify the
code.
Change-Id: I6716f3ad9bc21ab066888a3b373719c5e4f30af2
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Iecbd4e35faf733c6be84f760d4636d772188283c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Returns a list of scene points for all points that have not been
accepted yet.
Change-Id: I218e0c779d236e1b5d7d16fe1537adf454b94035
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With this we can get rid of "itemForTouchPointId" which kept track of
the individual grabbing of touch points. The new approach allows big
cleanups and makes understanding the code easier.
Change-Id: I19f7cda1b430e088ada707b2e75d97ca8dbadcc5
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Id9d602a4312db3877e21e449fcd2bbb3b58e1ced
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Returns a list of all items that grabbed a point of the event before.
Change-Id: Ifa7e6cc7486c4e1a7446a6bf3d4e62d19983ecf7
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The idea is to manage the "grab" for mouse and touch points inside the
pointer event, instead of having awkward extra state in the window.
Change-Id: I4011c66c163159b0315bf8e284d8e1c7c460f108
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Having the members static in QWindowPrivate only gives the benefit of
tidyness, but there's still the problem of initialization order and
thread-safety.
Q_GLOBAL_STATIC solves those issues for us.
Change-Id: I8e1279959d0bb2b16fd720cb7f4e9afb6eda6355
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
This makes it easy to avoid casts when using the classes.
Change-Id: I27bd1244bffb3a7d2cdb4572c229333e4c499d9b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ie84e39918d9657b29df697be7b0e5198298c48ba
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I58af7a1603bca3a17713e4cb674ae004e2d6eda9
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I25c521856cd6d73daeddacb4ae998e4de9109448
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The points are conceptually children, so this will help take care of
memory management. It's also useful to be able to emit or pass
a QQuickEventPoint without losing the context of the event it came from.
To this end, a pointerEvent() accessor is added, which simply does
the static_cast for you.
Change-Id: I71e57655cf1a0e7d741c4099c7eb9fc3a9a76446
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I931a7b264c68c40e16d9467b48173311aef74bd0
|
| |
| |
| |
| |
| |
| |
| | |
It seems to be the same sort of persistent event for exposure to QML.
Change-Id: I4ebc48422ee517f37e300629b6d100f68b9703b3
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The functions should be const, but the returned point not. This allows
accepting the points.
Change-Id: Iedbe8f3be38d672b33eea352f959b6e2bb6bc4fc
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Convenience method to decide if the event is completely accepted or
further delivery makes sense.
Change-Id: I389a975cca2966962848203f69ec7f2e307a210a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
That will allow the event instances to hold state, even between events.
So now every QQuickWindow has its own set of them, per device.
Hopefully that means we won't have any trouble delivering events in parallel
in case each window has its own thread. Otherwise maybe it's slightly
wasteful in multi-window apps.
Change-Id: I766b580e1c177255905cc04b5de7d33ae503c6fd
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
In a following patch, the device will own the event instance by value,
so it needs to be defined first.
Change-Id: Id1520257115889198c3e9ff20c56028c0b6d4bd2
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Some handlers will care for how long the point has been held so far.
Change-Id: I390d92988619054918fcdecd4b092ca9b4cfdea0
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Id6a41545036b7fe37d5b486789f77642a4241d9a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
It makes it easier to send synthetic mouse events for touch.
Change-Id: Ibb8e2737e3245ae7438708aa170ec1f888e770d8
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The first few values in QQuickPointerDevice::CapabilityFlag must be
kept in sync with QTouchDevice::CapabilityFlag, so make it explicit.
Change-Id: I0c1147319e057df26a8a732a4e494b762a1f5301
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I104edaabc35a073e14e8c66cd268ecd3782ed361
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In 649b309ea9ed7d03aa74565d51edb416c23460d9 it was correct that the
pool did not need to be static, because the whole event is a singleton;
but it allowed the actual m_touchPoints vector to keep growing,
rather than resizing to the current number of points. When one finger
is pressed, then two, then one is released, pointCount must go from
1 -> 2 -> 1. And yet we'd like to avoid heap-allocating a fresh
QQuickEventTouchPoint object every time a touchpoint is pressed. The
choices are then to 1) exploit implementation details of QVector to
allow its count() to be different than its stored size but still
guarantee that every pointer it stores points to a long-lived
QQuickEventTouchPoint (the docs do say "Since Qt 5.6, resize() doesn't
shrink the capacity anymore"), which is what we thought we were doing;
2) store the pointCount in a separate variable, so that the prefix of
m_touchPoints are the valid ones while the remainder is the "pool", or
3) hold a separate reusable pool of touchpoints. The separate
m_pointCount is cheaper than the pool, so let's go with option 2.
Change-Id: Ic59b5393e9f4b05e4ec27db15d6f06253aa820d5
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Maybe if (isTouchEvent()) is more efficient than if (asTouchEvent()).
Change-Id: Ie3e216ff5c9b512abc4a25690f98cb948e8b5399
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It's not enough on Windows: it gets sign-extended, so 0x08 becomes -8
as an int, in comparisons. The result was that touchpoints were never
released.
Anyway we hardly have to worry about this now that we're not copying
the event points.
Change-Id: I0d47a0974a9cf5bc9a090a15948d112df32403eb
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It's similar to QQuickWindowPrivate::touchEventWithPoints(), and is
used in the same way when delivering a QQuickPointerEvent by sending
a QTouchEvent to the item's event() method.
Change-Id: I0d181eaf924bfdad2db2de9d8acf85d0345aec3e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Id7fc9df6b57c63f9cbdbc96f3e141ee509782e59
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|