From a75d42b4a52641f4f2edd1fb01d83949c7226e08 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 14 Oct 2023 10:53:20 -0700 Subject: [PATCH] core: allow arrow key on scroll to fail write to IO Fixes #625 This only applies if there is a LOT of scroll events. In that case, clamping the scroll events to whatever our IO thread can handle seems fine. An alternate approach is to allocate. --- src/Surface.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Surface.zig b/src/Surface.zig index 575a7e822..f3ef1895d 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -1202,7 +1202,7 @@ pub fn scrollCallback( for (0..y.delta_unsigned) |_| { _ = self.io_thread.mailbox.push(.{ .write_stable = seq, - }, .{ .forever = {} }); + }, .{ .instant = {} }); } }