mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
Merge pull request #1105 from mitchellh/kitty-lock
renderer/opengl: acquire lock to prep kitty images
This commit is contained in:
@ -709,6 +709,11 @@ pub fn updateFrame(
|
||||
// We only do this if the Kitty image state is dirty meaning only if
|
||||
// it changes.
|
||||
if (state.terminal.screen.kitty_images.dirty) {
|
||||
// prepKittyGraphics touches self.images which is also used
|
||||
// in drawFrame so if we're drawing on a separate thread we need
|
||||
// to lock this.
|
||||
if (single_threaded_draw) self.draw_mutex.lock();
|
||||
defer if (single_threaded_draw) self.draw_mutex.unlock();
|
||||
try self.prepKittyGraphics(state.terminal);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user