diff options
| author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-08-31 23:48:45 +0200 |
|---|---|---|
| committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-09-03 22:38:07 +0200 |
| commit | ae8e96d4c2fc430ed6f71e422ef4aff2c7f15186 (patch) | |
| tree | 64bfdcab395148eab96a5182b799db75df879182 /src/widgets/doc/snippets/qstyleplugin/main.cpp | |
| parent | f8e0c7d008f02f4d62722d866bf4a19f6914493d (diff) | |
macOS: Don't rely on invalidateCursorRectsForView when mouse is over view
Calling invalidateCursorRectsForView will normally result in a updateCursor
callback, where we then set the current cursor using [NSCursor set]. But
if an override cursor is set by AppKit, which happens for example when
hovering over a resizable window's theme frame, then AppKit ignores the
call to invalidateCursorRectsForView. And it will not consult the view
when the override cursor is unset again, which results in the cursor
being reset back to the default arrow cursor instead of the cursor
that was set when we initiated the invalidateCursorRectsForView call.
We need to hit-test to confirm that the mouse is over the view,
as there might be child views in the mix that also have custom
cursors, and we don't want to activate the parent view's cursor
unless we're actually over that view.
Fixes: QTBUG-81552
Fixes: QTBUG-96003
Pick-to: 6.2 5.15
Change-Id: I52573ab7be82f28c6a1cf686bd4b133551cfe98b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/widgets/doc/snippets/qstyleplugin/main.cpp')
0 files changed, 0 insertions, 0 deletions
