diff options
author | Morten Johan Sørvig <morten.sorvig@digia.com> | 2013-10-09 08:43:34 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-01 09:38:12 +0100 |
commit | d1114669e301e35cc4e9b2e4c8c4b9476180fb56 (patch) | |
tree | d96efc96e6f119a2433b9baaccec15871c11b25b /src/plugins/platforms/cocoa/qcocoacursor.h | |
parent | d0f8ba748e4ee93b4b2a205421a0340b2d146ce5 (diff) |
Cocoa: Improve cursor setting.
Implement cursor setting in terms of [NSCursor set]
and [NSView cursorUpdate] using the window tracking
area.
Refactor cursor conversion into QCocoaCursor::
convertCursor. Rename QCoocaWindow::m_underMouseWindow
to m_enterLeaveTargetWindow since it's set according
to spesific enter/leave logic. Add m_windowUnderMouse
which tracks mouseEntered/mouseExited state.
Task-number: QTBUG-33961
Change-Id: Id5e12594f5db365e09c9926a4c08d748a9afb935
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoacursor.h')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoacursor.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoacursor.h b/src/plugins/platforms/cocoa/qcocoacursor.h index dfa1fcff81..f332240724 100644 --- a/src/plugins/platforms/cocoa/qcocoacursor.h +++ b/src/plugins/platforms/cocoa/qcocoacursor.h @@ -55,12 +55,13 @@ public: QCocoaCursor(); ~QCocoaCursor(); - virtual void changeCursor(QCursor * widgetCursor, QWindow * widget); + virtual void changeCursor(QCursor *cursor, QWindow *window); virtual QPoint pos() const; virtual void setPos(const QPoint &position); private: QHash<Qt::CursorShape, NSCursor *> m_cursors; - NSCursor *createCursorData(QCursor *); + NSCursor *convertCursor(QCursor *cursor); + NSCursor *createCursorData(QCursor * cursor); NSCursor *createCursorFromBitmap(const QBitmap *bitmap, const QBitmap *mask, const QPoint hotspot = QPoint()); NSCursor *createCursorFromPixmap(const QPixmap pixmap, const QPoint hotspot = QPoint()); }; |