[macOS] Fix mouse cursor being replaced by AppKit (flutter/engine#36283)

This commit is contained in:
Matej Knopp 2022-10-20 22:13:11 +02:00 committed by GitHub
parent 1ddb84552e
commit 54166ee36c

View File

@ -114,6 +114,15 @@
return YES;
}
- (void)cursorUpdate:(NSEvent*)event {
// When adding/removing views AppKit will schedule call to current hit-test view
// cursorUpdate: at the end of frame to determine possible cursor change. If
// the view doesn't implement cursorUpdate: AppKit will set the default (arrow) cursor
// instead. This would replace the cursor set by FlutterMouseCursorPlugin.
// Empty cursorUpdate: implementation prevents this behavior.
// https://github.com/flutter/flutter/issues/111425
}
- (void)viewDidChangeBackingProperties {
[super viewDidChangeBackingProperties];
// Force redraw