qt5base-lts/tests/manual/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
..
appicon Updated license headers 2016-01-21 18:55:18 +00:00
menurama QCocoaMenu: De-pessimize the number of calls to validateMenuItem: 2017-08-15 01:21:37 +00:00
menus Updated license headers 2016-01-21 18:55:18 +00:00
nativewidgets Updated license headers 2016-01-21 18:55:18 +00:00
popups Updated license headers 2016-01-21 18:55:18 +00:00
qmaccocoaviewcontainer Implement QMacCocoaViewContainer in terms of foreign window 2016-10-05 19:37:17 +00:00
qsystemtrayicon Updated license headers 2016-01-21 18:55:18 +00:00
qt_on_cocoa macOS: Respect responder chain when setting cursor 2017-09-01 10:04:52 +00:00
wheelevent Updated license headers 2016-01-21 18:55:18 +00:00