[libadwaita/libadwaita-1-0] swipe-tracker: Skip hold events
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/libadwaita-1-0] swipe-tracker: Skip hold events
- Date: Wed, 3 Aug 2022 10:15:02 +0000 (UTC)
commit 41b25f413ba9bb8cb99c455f4fdb0161b64ea40f
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Jul 22 21:30:44 2022 +0400
swipe-tracker: Skip hold events
(cherry picked from commit 33c9492aae088c84491fd0a280ec98f7c06ceb01)
(cherry picked from commit 083e2ea144254e7246263837772f07df60c45339)
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 ac647b3f..ca1b1a7f 100644
--- a/src/adw-swipe-tracker.c
+++ b/src/adw-swipe-tracker.c
@@ -666,6 +666,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]