[libadwaita/wip/exalm/scroll: 2/2] swipe-tracker: Skip hold events
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/scroll: 2/2] swipe-tracker: Skip hold events
- Date: Fri, 22 Jul 2022 17:31:05 +0000 (UTC)
commit 33c9492aae088c84491fd0a280ec98f7c06ceb01
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Jul 22 21:30:44 2022 +0400
swipe-tracker: Skip hold events
src/adw-swipe-tracker.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/adw-swipe-tracker.c b/src/adw-swipe-tracker.c
index 2ab3b0d8..66e42b6e 100644
--- a/src/adw-swipe-tracker.c
+++ b/src/adw-swipe-tracker.c
@@ -675,6 +675,9 @@ handle_scroll_event (AdwSwipeTracker *self,
is_vertical = (self->orientation == GTK_ORIENTATION_VERTICAL);
distance = is_vertical ? TOUCHPAD_BASE_DISTANCE_V : TOUCHPAD_BASE_DISTANCE_H;
+ if (!event || gdk_event_get_event_type (event) != GDK_SCROLL)
+ return GDK_EVENT_PROPAGATE;
+
if (gdk_scroll_event_get_direction (event) != GDK_SCROLL_SMOOTH)
return GDK_EVENT_PROPAGATE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]