aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2005-10-04 04:23:12 +0000
committerStefan Monnier2005-10-04 04:23:12 +0000
commit4156359ea5abc7affe6ed1e93bec8e4b1cd4b977 (patch)
treef288a44fbec1eefc8453708d3dca25b934c6783d
parentc7bef55feee147fb2db36d60932ea68a024d4eaf (diff)
downloademacs-4156359ea5abc7affe6ed1e93bec8e4b1cd4b977.tar.gz
emacs-4156359ea5abc7affe6ed1e93bec8e4b1cd4b977.zip
(make_lispy_event): If point has moved between down and up event, make it
a drag, not a click, to mirror what mouse-drag-region expects.
-rw-r--r--src/ChangeLog23
-rw-r--r--src/keyboard.c18
2 files changed, 27 insertions, 14 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 351dbcf1e39..d57a739d45a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12005-10-04 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * keyboard.c (make_lispy_event): If point has moved between down and up
4 event, make it a drag, not a click, to mirror what
5 mouse-drag-region expects.
6
12005-10-02 Dan Nicolaescu <dann@ics.uci.edu> 72005-10-02 Dan Nicolaescu <dann@ics.uci.edu>
2 8
3 * lisp.h (fatal): Undo previous change. 9 * lisp.h (fatal): Undo previous change.
@@ -17,8 +23,8 @@
17 23
18 * macfns.c (start_hourglass): Apply 2005-05-07 change for xfns.c. 24 * macfns.c (start_hourglass): Apply 2005-05-07 change for xfns.c.
19 (x_create_tip_frame) [GLYPH_DEBUG]: Uncomment debug code. 25 (x_create_tip_frame) [GLYPH_DEBUG]: Uncomment debug code.
20 (Fx_create_frame, x_create_tip_frame) [USE_ATSUI]: Try 26 (Fx_create_frame, x_create_tip_frame) [USE_ATSUI]:
21 ATSUI-compatible 12pt Monaco font first. 27 Try ATSUI-compatible 12pt Monaco font first.
22 28
23 * macgui.h (struct _XCharStruct): New member valid_p. 29 * macgui.h (struct _XCharStruct): New member valid_p.
24 (STORE_XCHARSTRUCT): Set valid_p. 30 (STORE_XCHARSTRUCT): Set valid_p.
@@ -41,8 +47,7 @@
41 47
422005-09-30 Dan Nicolaescu <dann@ics.uci.edu> 482005-09-30 Dan Nicolaescu <dann@ics.uci.edu>
43 49
44 * image.c (slurp_file, xbm_read_bitmap_data): Cast to the correct 50 * image.c (slurp_file, xbm_read_bitmap_data): Cast to the correct type.
45 type.
46 * xterm.c (handle_one_xevent, handle_one_xevent): Likewise. 51 * xterm.c (handle_one_xevent, handle_one_xevent): Likewise.
47 52
48 * unexelf.c (fatal): Fix prototype. 53 * unexelf.c (fatal): Fix prototype.
@@ -51,8 +56,7 @@
51 56
52 * regex.c (re_char): Move typedef ... 57 * regex.c (re_char): Move typedef ...
53 * regex.h (re_char): ... here. 58 * regex.h (re_char): ... here.
54 (re_iswctype, re_wctype, re_set_whitespace_regexp): New 59 (re_iswctype, re_wctype, re_set_whitespace_regexp): New prototypes.
55 prototypes.
56 60
57 * emacs.c (malloc_set_state): Fix return type. 61 * emacs.c (malloc_set_state): Fix return type.
58 (endif): Fix type. 62 (endif): Fix type.
@@ -74,8 +78,7 @@
74 (__malloc_hook, __realloc_hook, __free_hook): Fix prototypes. 78 (__malloc_hook, __realloc_hook, __free_hook): Fix prototypes.
75 (emacs_blocked_free): Change definition to match __free_hook. 79 (emacs_blocked_free): Change definition to match __free_hook.
76 (emacs_blocked_malloc): Change definition to match __malloc_hook. 80 (emacs_blocked_malloc): Change definition to match __malloc_hook.
77 (emacs_blocked_realloc): Change definition to match 81 (emacs_blocked_realloc): Change definition to match __realloc_hook.
78 __realloc_hook.
79 82
802005-09-30 Romain Francoise <romain@orebokech.com> 832005-09-30 Romain Francoise <romain@orebokech.com>
81 84
@@ -132,8 +135,8 @@
132 135
1332005-09-23 Dan Nicolaescu <dann@ics.uci.edu> 1362005-09-23 Dan Nicolaescu <dann@ics.uci.edu>
134 137
135 * s/aix4-2.h (BROKEN_GET_CURRENT_DIR_NAME): Define 138 * s/aix4-2.h (BROKEN_GET_CURRENT_DIR_NAME):
136 BROKEN_GET_CURRENT_DIR_NAME. 139 Define BROKEN_GET_CURRENT_DIR_NAME.
137 140
138 * sysdep.c (get_current_dir_name): Also define if 141 * sysdep.c (get_current_dir_name): Also define if
139 BROKEN_GET_CURRENT_DIR_NAME. 142 BROKEN_GET_CURRENT_DIR_NAME.
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