diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2012-07-25 14:04:47 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-26 05:54:37 +0200 |
commit | 419296133aa68a317838e047b22513f1e5508b47 (patch) | |
tree | e3a0597f6d9c83cc2ac06eba385decd3ec12ff62 /src/quick/items/qquickwindow_p.h | |
parent | 57485805057eda17008d14ca618e9c1f69a5a35d (diff) |
Fix resolution of cursor when items are overlapping.
If MouseArea with cursorShapes are overlapping then cursor shape
of the foremost item under the mouse cursor should be shown, but because
the hover events are delivered to the foremost items first the opposite
is occuring. This makes QQuickWindow responsible for correctly setting
its own cursor instead of relying on items to work it out amongst
themselves.
Change-Id: Iedf144c583dfa3d1ff441e19db9601b5e171902a
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/quick/items/qquickwindow_p.h')
-rw-r--r-- | src/quick/items/qquickwindow_p.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/quick/items/qquickwindow_p.h b/src/quick/items/qquickwindow_p.h index 52e46ca6a8..267c8d3104 100644 --- a/src/quick/items/qquickwindow_p.h +++ b/src/quick/items/qquickwindow_p.h @@ -113,6 +113,9 @@ public: // Keeps track of the item currently receiving mouse events QQuickItem *mouseGrabberItem; +#ifndef QT_NO_CURSOR + QQuickItem *cursorItem; +#endif #ifndef QT_NO_DRAGANDDROP QQuickDragGrabber dragGrabber; #endif @@ -145,6 +148,10 @@ public: void deliverDragEvent(QQuickDragGrabber *, QEvent *); bool deliverDragEvent(QQuickDragGrabber *, QQuickItem *, QDragMoveEvent *); #endif +#ifndef QT_NO_CURSOR + void updateCursor(const QPointF &scenePos); + QQuickItem *findCursorItem(QQuickItem *item, const QPointF &scenePos); +#endif QList<QQuickItem*> hoverItems; enum FocusOption { |