Browse Source

[OSX] dont use cursor rects, to prevent crashing.

Dan Walmsley 6 years ago
parent
commit
fcddf46cd7
1 changed files with 2 additions and 4 deletions
  1. 2 4
      native/Avalonia.Native/src/OSX/window.mm

+ 2 - 4
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