[gtk/wip/chergert/macos-decelerate] macos: fix typo when creating scroll events
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/macos-decelerate] macos: fix typo when creating scroll events
- Date: Thu, 3 Dec 2020 21:41:29 +0000 (UTC)
commit 115ea624d9ce9c77e9bcf0b5dcca6784f70ab727
Author: Christian Hergert <chergert redhat com>
Date: Thu Dec 3 13:44:14 2020 -0800
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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]