Browse Source
Merge pull request #3007 from AvaloniaUI/fixes/3000-cursor-rects-crash-osx
[OSX] dont use cursor rects, to prevent crashing.
pull/3017/head
Nikita Tsukanov
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
4 deletions
-
native/Avalonia.Native/src/OSX/window.mm
|
|
|
@ -369,12 +369,9 @@ public: |
|
|
|
|
|
|
|
virtual void UpdateCursor() |
|
|
|
{ |
|
|
|
[View resetCursorRects]; |
|
|
|
if (cursor != nil) |
|
|
|
{ |
|
|
|
auto rect = [Window frame]; |
|
|
|
[View addCursorRect:rect cursor:cursor]; |
|
|
|
[cursor set]; |
|
|
|
[cursor set]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -425,6 +422,7 @@ private: |
|
|
|
{ |
|
|
|
WindowEvents = events; |
|
|
|
[Window setCanBecomeKeyAndMain]; |
|
|
|
[Window disableCursorRects]; |
|
|
|
} |
|
|
|
|
|
|
|
virtual HRESULT Show () override |
|
|
|
|