Skip to content

Commit

Permalink
Merge pull request #9376 from AvaloniaUI/fixes/macos-multi-window-freeze
Browse files Browse the repository at this point in the history
[OSX] Fixed multi-window freeze on Show when another window is rendering
  • Loading branch information
maxkatz6 authored Nov 8, 2022
2 parents a344fec + e7681e9 commit 186faca
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 186faca

Please sign in to comment.