shithub: puzzles

Download patch

ref: 111db0743bd273c340dd683449076fd9ec5797f5
parent: a1f1d7c24713277a96c1f508cd3782e5aaf18c69
author: Chris Boyle <chris@boyle.name>
date: Fri Feb 10 10:23:33 EST 2023

Tracks: set drag_s{x,y} even if starting off-grid

Otherwise, if subsequent mouse/finger movement lines up with the previous
drag attempt's start, then suddenly a drag is in progress from there, which
is confusing.

Fixes #588

(cherry picked from Android port,
commit 8ce1bbe460d70a915caf2dbeb30354d22dc8a8ef)

--- a/tracks.c
+++ b/tracks.c
@@ -2267,6 +2267,7 @@
 
         if (!INGRID(state, gx, gy)) {
             /* can't drag from off grid */
+            ui->drag_sx = ui->drag_sy = -1;
             return NULL;
         }