diff options
author | Martin Rudalics <rudalics@gmx.at> | 2014-10-24 11:58:43 +0200 |
---|---|---|
committer | Martin Rudalics <rudalics@gmx.at> | 2014-10-24 11:58:43 +0200 |
commit | 3110159d1fb6b6071803355951d9ae314095df36 (patch) | |
tree | 461fd18f8295b9cfc9b6ef7bbc64d4929ba814ab /src/keyboard.c | |
parent | 9321c9c361d106037831ba6bb43f03db2808422d (diff) | |
download | emacs-3110159d1fb6b6071803355951d9ae314095df36.tar.gz |
Improve mouse dragging of frame edges.
* keyboard.c (make_lispy_position): Return coordinates also when
on scroll bars, fringes, margins or not in a window.
* xdisp.c (show_mouse_face): Don't change cursor face during
mouse tracking.
* mouse.el (mouse-drag-line): Don't use mouse-pixel-position.
Calculate increment from last position instead of window edge.
Add right- and bottom-divider bindings to transient map.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r-- | src/keyboard.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index e8143f26681..32d14ab0760 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -5332,12 +5332,14 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y, &object, &dx, &dy, &width, &height); if (STRINGP (string)) string_info = Fcons (string, make_number (charpos)); + xret = wx; yret = wy - WINDOW_HEADER_LINE_HEIGHT (w); } else if (part == ON_LEFT_FRINGE) { posn = Qleft_fringe; col = 0; + xret = wx; dx = wx - (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) ? 0 : window_box_width (w, LEFT_MARGIN_AREA)); @@ -5347,6 +5349,7 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y, { posn = Qright_fringe; col = 0; + xret = wx; dx = wx - window_box_width (w, LEFT_MARGIN_AREA) - window_box_width (w, TEXT_AREA) @@ -5360,9 +5363,23 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y, posn = Qvertical_line; width = 1; dx = 0; + xret = wx; + dy = yret = wy; + } + else if (part == ON_VERTICAL_SCROLL_BAR) + { + posn = Qvertical_scroll_bar; + width = WINDOW_SCROLL_BAR_AREA_WIDTH (w); + dx = xret = wx; + dy = yret = wy; + } + else if (part == ON_HORIZONTAL_SCROLL_BAR) + { + posn = Qhorizontal_scroll_bar; + width = WINDOW_SCROLL_BAR_AREA_HEIGHT (w); + dx = xret = wx; dy = yret = wy; } - /* Nothing special for part == ON_SCROLL_BAR. */ else if (part == ON_RIGHT_DIVIDER) { posn = Qright_divider; @@ -5446,7 +5463,12 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y, extra_info))); } else if (f != 0) - XSETFRAME (window, f); + { + /* Return mouse pixel coordinates here. */ + XSETFRAME (window, f); + xret = XINT (x); + yret = XINT (y); + } else window = Qnil; |