summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Dreßler <verdre@v0yd.nl>2019-08-22 11:40:46 +0200
committerOlivier Fourdan <ofourdan@redhat.com>2019-08-24 09:25:14 +0000
commit9b3b5badfbbe004115003fead50d7eb2c47dc33d (patch)
tree16138dc20af21afabd1aa2288f42a0fe5d97481a
parent47c1558287526c2f82747e37d6fb1582743b366d (diff)
downloadmutter-9b3b5badfbbe004115003fead50d7eb2c47dc33d.tar.gz
clutter/input-pointer-a11y: Fix dwell timeout start after moving pointer
Sometimes the dwell timeout doesn't start again after quickly moving the pointer. That happens if `should_stop_dwell` returns TRUE for the last motion event we receive: It will stop the current timeout, but not start a new one until we receive another event where the moved distance is smaller than the threshold. To fix this, always call `should_start_dwell` and `start_dwell_timeout` instead of using an else-block, this makes sure we start a new dwell timeout still during the same motion event that stopped the old one. https://gitlab.gnome.org/GNOME/mutter/merge_requests/746
-rw-r--r--clutter/clutter/clutter-input-pointer-a11y.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/clutter/clutter/clutter-input-pointer-a11y.c b/clutter/clutter/clutter-input-pointer-a11y.c
index c2b42e00a..0e7c5847b 100644
--- a/clutter/clutter/clutter-input-pointer-a11y.c
+++ b/clutter/clutter/clutter-input-pointer-a11y.c
@@ -599,7 +599,8 @@ _clutter_input_pointer_a11y_on_motion_event (ClutterInputDevice *device,
{
if (should_stop_dwell (device))
stop_dwell_timeout (device);
- else if (should_start_dwell (device))
+
+ if (should_start_dwell (device))
start_dwell_timeout (device);
}