[gtk+] Do not filter out small scroll event fractions
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Do not filter out small scroll event fractions
- Date: Mon, 26 Sep 2016 15:50:08 +0000 (UTC)
commit fe216b0039bb4344d715421245327ce3547c0a08
Author: Andreas Pokorny <andreas pokorny canonical com>
Date: Sun Aug 14 01:29:35 2016 +0200
Do not filter out small scroll event fractions
The scroll motion values are subject of batching and scaling. Either
through scaling or by using a touchpad smooth scroll motion changes
below 0.5 are possible.
https://bugzilla.gnome.org/show_bug.cgi?id=769554
Signed-off-by: Andreas Pokorny <andreas pokorny canonical com>
gdk/mir/gdkmireventsource.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk/mir/gdkmireventsource.c b/gdk/mir/gdkmireventsource.c
index b363062..8c7e106 100644
--- a/gdk/mir/gdkmireventsource.c
+++ b/gdk/mir/gdkmireventsource.c
@@ -196,7 +196,7 @@ generate_scroll_event (GdkWindow *window, gdouble x, gdouble y, gdouble delta_x,
else
{
event->scroll.direction = GDK_SCROLL_SMOOTH;
- event->scroll.delta_x = -delta_x;
+ event->scroll.delta_x = delta_x;
event->scroll.delta_y = -delta_y;
}
@@ -403,7 +403,7 @@ handle_motion_event (GdkWindow *window, const MirInputEvent *event)
hscroll = mir_pointer_event_axis_value (pointer_event, mir_pointer_axis_hscroll);
vscroll = mir_pointer_event_axis_value (pointer_event, mir_pointer_axis_vscroll);
- if (ABS (hscroll) > 0.5 || ABS (vscroll) > 0.5)
+ if (hscroll != 0.0 || vscroll != 0.0)
generate_scroll_event (window, x, y, hscroll, vscroll, modifier_state, event_time);
if (ABS (new_x - x) > 0.5 || ABS (new_y - y) > 0.5)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]