Skip to content

Commit

Permalink
[OSX] dont use cursor rects, to prevent crashing.
Browse files Browse the repository at this point in the history
  • Loading branch information
danwalmsley committed Oct 9, 2019
1 parent a4eed99 commit 01f8196
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions native/Avalonia.Native/src/OSX/window.mm
Original file line number Diff line number Diff line change
Expand Up @@ -359,12 +359,9 @@ virtual HRESULT SetCursor(IAvnCursor* cursor) override

virtual void UpdateCursor()
{
[View resetCursorRects];
if (cursor != nil)
{
auto rect = [Window frame];
[View addCursorRect:rect cursor:cursor];
[cursor set];
[cursor set];
}
}

Expand Down Expand Up @@ -415,6 +412,7 @@ virtual void OnResized ()
{
WindowEvents = events;
[Window setCanBecomeKeyAndMain];
[Window disableCursorRects];
}

virtual HRESULT Show () override
Expand Down

0 comments on commit 01f8196

Please sign in to comment.