Browse Source

Merge branch 'master' into feature/renderOptionsRequiresFullOpacityHandling

pull/12572/head
Dan Walmsley 3 years ago
committed by GitHub
parent
commit
b5314c6f74
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 29
      native/Avalonia.Native/src/OSX/platformthreading.mm

29
native/Avalonia.Native/src/OSX/platformthreading.mm

@ -17,7 +17,6 @@ public:
Cancelled = true; Cancelled = true;
if(Running) if(Running)
{ {
Running = false;
if(![NSThread isMainThread]) if(![NSThread isMainThread])
{ {
AddRef(); AddRef();
@ -28,22 +27,22 @@ public:
}); });
return; return;
}; };
Running = false;
if(IsApp) if(IsApp)
[NSApp stop:nil]; [NSApp stop:nil];
else
{ // Wakeup the event loop
// Wakeup the event loop NSEvent* event = [NSEvent otherEventWithType:NSEventTypeApplicationDefined
NSEvent* event = [NSEvent otherEventWithType:NSEventTypeApplicationDefined location:NSMakePoint(0, 0)
location:NSMakePoint(0, 0) modifierFlags:0
modifierFlags:0 timestamp:0
timestamp:0 windowNumber:0
windowNumber:0 context:nil
context:nil subtype:0
subtype:0 data1:0
data1:0 data2:0];
data2:0]; [NSApp postEvent:event atStart:YES];
[NSApp postEvent:event atStart:YES];
}
} }
}; };
}; };

Loading…
Cancel
Save