From 0392f49cfc9d0fc94282fdf85854b31c67b1cd02 Mon Sep 17 00:00:00 2001 From: zakkor Date: Thu, 29 Dec 2022 01:31:55 +0200 Subject: [PATCH] devdraw: Fix mouse wheel scrolling in 1-tick increments on macOS --- src/cmd/devdraw/mac-screen.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmd/devdraw/mac-screen.m b/src/cmd/devdraw/mac-screen.m index 9e51eec6..f07054cf 100644 --- a/src/cmd/devdraw/mac-screen.m +++ b/src/cmd/devdraw/mac-screen.m @@ -601,12 +601,12 @@ rpc_resizewindow(Client *c, Rectangle r) - (void)scrollWheel:(NSEvent*)e { - NSInteger s; + CGFloat s; s = [e scrollingDeltaY]; - if(s > 0) + if(s > 0.0f) [self sendmouse:8]; - else if (s < 0) + else if (s < 0.0f) [self sendmouse:16]; }