macOS: Always respond to cursorUpdate by applying custom cursor if set
Calling super will push the default arrow cursor, so we should only do that if our own cursor has been unset. Change-Id: I71d8934e7eab2b15e150730e2282e7063ada305a Fixes: QTBUG-75552 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>bb10
parent
99b1719c1e
commit
9054950b7c
|
|
@ -497,12 +497,15 @@
|
|||
// uses the legacy cursorRect API, so the cursor is reset to the arrow
|
||||
// cursor. See rdar://34183708
|
||||
|
||||
if (self.cursor && self.cursor != NSCursor.currentCursor) {
|
||||
qCInfo(lcQpaMouse) << "Updating cursor for" << self << "to" << self.cursor;
|
||||
auto previousCursor = NSCursor.currentCursor;
|
||||
|
||||
if (self.cursor)
|
||||
[self.cursor set];
|
||||
} else {
|
||||
else
|
||||
[super cursorUpdate:theEvent];
|
||||
}
|
||||
|
||||
if (NSCursor.currentCursor != previousCursor)
|
||||
qCInfo(lcQpaMouse) << "Cursor update for" << self << "resulted in new cursor" << NSCursor.currentCursor;
|
||||
}
|
||||
|
||||
- (void)mouseMovedImpl:(NSEvent *)theEvent
|
||||
|
|
|
|||
Loading…
Reference in New Issue