From a64d12d3cbe8e96df09ee013d125f9cde24948b9 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 17 Nov 2023 20:56:31 -0800 Subject: [PATCH] renderer: animations should stop if config changes them --- src/renderer/Thread.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/renderer/Thread.zig b/src/renderer/Thread.zig index e6d0809a5..156d6cd6d 100644 --- a/src/renderer/Thread.zig +++ b/src/renderer/Thread.zig @@ -310,6 +310,11 @@ fn drainMailbox(self: *Thread) !void { .change_config => |config| { defer config.alloc.destroy(config.ptr); try self.renderer.changeConfig(config.ptr); + + // Stop and start the draw timer to capture the new + // hasAnimations value. + self.stopDrawTimer(); + self.startDrawTimer(); }, .inspector => |v| self.flags.has_inspector = v,