qt5base-lts/tests/manual/cocoa/qt_on_cocoa
Tor Arne Vestbø 362dcb4759 macOS: Respect responder chain when setting cursor
There's no need for us to walk our own ancestor chain to figure out which
cursor to set. AppKit will automatically call cursorUpdate: on the view
that would be the hitTest target of the current mouse position, and by
falling back to super when no cursor is set for the current view, we
automatically get the behavior that effectiveWindowCursor tried to solve.

In addition, it solves the case of applyEffectiveWindowCursor applying
the arrowCursor when no cursor was set, which would mean that if any
native parent view of our view _did_ have a cursor set, we would not
fall back to the native view's cursor, but instead override it with
the arrow cursor. Following the responder chain gives the correct
behavior in this case.

Unfortunately, due to rdar://34183708, if a subview of one of our
views uses the legacy cursorRect approach to cursor management, the
cursor will not be reset back to our cursor via cursorUpdate: when
leaving the child and entering the parent view (our view). Moving
our implementation over to the legacy API would solve this problem,
but just propagate it to native parent views of our views, which
could potentially use NSTrackingAreas, and would not have _their_
cursors re-set.

Change-Id: Id20cc03136f0b1d4b9120750fe63ddc455363aaf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-09-01 10:04:52 +00:00
..
main.mm macOS: Respect responder chain when setting cursor 2017-09-01 10:04:52 +00:00
qt_on_cocoa.pro Link to AppKit instead of Cocoa. 2015-09-05 11:49:17 +00:00
rasterwindow.cpp macOS: Respect responder chain when setting cursor 2017-09-01 10:04:52 +00:00
rasterwindow.h macOS: Update qt_on_cocoa manual test 2017-08-31 23:09:24 +00:00