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

Loading…
Cancel
Save