mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-08-29 18:41:40 +00:00
renderer: kitty image update requires draw_mutex
Fixes #10680 The image state is used for drawing, so when we update it, we need to acquire the draw mutex. All our other state updates already acquire the draw mutex but Kitty images are odd in that they happen in the critical area (due to their size).
This commit is contained in:
@@ -1226,6 +1226,10 @@ pub fn Renderer(comptime GraphicsAPI: type) type {
|
||||
// kitty state on every frame because any cell change can move
|
||||
// an image.
|
||||
if (self.images.kittyRequiresUpdate(state.terminal)) {
|
||||
// We need to grab the draw mutex since this updates
|
||||
// our image state that drawFrame uses.
|
||||
self.draw_mutex.lock();
|
||||
defer self.draw_mutex.unlock();
|
||||
self.images.kittyUpdate(
|
||||
self.alloc,
|
||||
state.terminal,
|
||||
|
||||
Reference in New Issue
Block a user