Skip to content

Commit

Permalink
[OSX] Fixed multi-window freeze on Show when another window is rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Tsukanov authored and Nikita Tsukanov committed Nov 7, 2022
1 parent 6fb5de4 commit 84c04bc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion native/Avalonia.Native/src/OSX/rendertarget.mm
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,11 @@ - (void)updateLayer {
[_layer setContents: (__bridge IOSurface*) surface->surface];
}
[CATransaction commit];
[CATransaction flush];
}
// This can trigger event processing on the main thread
// which might need to lock the renderer
// which can cause a deadlock. So flush call is outside of the lock
[CATransaction flush];
}
else
dispatch_async(dispatch_get_main_queue(), ^{
Expand Down

0 comments on commit 84c04bc

Please sign in to comment.