aboutsummaryrefslogtreecommitdiffstats
path: root/src/keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index f41ce352cb8..3826d460e3f 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -5507,13 +5507,23 @@ make_lispy_event (event)
5507 if (CONSP (down) 5507 if (CONSP (down)
5508 && INTEGERP (XCAR (down)) && INTEGERP (XCDR (down))) 5508 && INTEGERP (XCAR (down)) && INTEGERP (XCDR (down)))
5509 { 5509 {
5510 xdiff = XFASTINT (event->x) - XFASTINT (XCAR (down)); 5510 xdiff = XINT (event->x) - XINT (XCAR (down));
5511 ydiff = XFASTINT (event->y) - XFASTINT (XCDR (down)); 5511 ydiff = XINT (event->y) - XINT (XCDR (down));
5512 } 5512 }
5513 5513
5514 if (xdiff < double_click_fuzz && xdiff > - double_click_fuzz 5514 if (xdiff < double_click_fuzz && xdiff > - double_click_fuzz
5515 && ydiff < double_click_fuzz 5515 && ydiff < double_click_fuzz && ydiff > - double_click_fuzz
5516 && ydiff > - double_click_fuzz) 5516 /* Maybe the mouse has moved a lot, caused scrolling, and
5517 eventually ended up at the same screen position (but
5518 not buffer position) in which case it is a drag, not
5519 a click. */
5520 /* FIXME: OTOH if the buffer position has changed
5521 because of a timer or process filter rather than
5522 because of mouse movement, it should be considered as
5523 a click. But mouse-drag-region completely ignores
5524 this case and it hasn't caused any real problem, so
5525 it's probably OK to ignore it as well. */
5526 && EQ (Fcar (Fcdr (start_pos)), Fcar (Fcdr (position))))
5517 /* Mouse hasn't moved (much). */ 5527 /* Mouse hasn't moved (much). */
5518 event->modifiers |= click_modifier; 5528 event->modifiers |= click_modifier;
5519 else 5529 else