From 115ea624d9ce9c77e9bcf0b5dcca6784f70ab727 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Thu, 3 Dec 2020 13:44:14 -0800 Subject: [PATCH] macos: fix typo when creating scroll events This fixes an issue where we would ignore events with Y delta and no X delta while scrolling due to a typo when checking for any delta. This fixes deceleration of kinetic scrolling on the macOS backend. Fixes #3418 --- gdk/macos/gdkmacosdisplay-translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdk/macos/gdkmacosdisplay-translate.c b/gdk/macos/gdkmacosdisplay-translate.c index f895db9686..5f5eeffdcf 100644 --- a/gdk/macos/gdkmacosdisplay-translate.c +++ b/gdk/macos/gdkmacosdisplay-translate.c @@ -610,7 +610,7 @@ fill_scroll_event (GdkMacosDisplay *self, sx = [nsevent scrollingDeltaX]; sy = [nsevent scrollingDeltaY]; - if (sx != 0.0 || dx != 0.0) + if (sx != 0.0 || sy != 0.0) ret = gdk_scroll_event_new (GDK_SURFACE (surface), pointer, NULL,