diff options
| author | Eli Zaretskii | 2015-06-30 18:59:21 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2015-06-30 18:59:21 +0300 |
| commit | edd09381c618125d8aa23c9414034fbeee176305 (patch) | |
| tree | 009641f2aad95cc9852b06b036a4e6a9f143be94 /doc | |
| parent | 881c4790266c42805ac1b9a5f1bbe13d3dd23478 (diff) | |
| download | emacs-edd09381c618125d8aa23c9414034fbeee176305.tar.gz emacs-edd09381c618125d8aa23c9414034fbeee176305.zip | |
Don't block changes in mouse pointer inside 'track-mouse'
* etc/NEWS:
* doc/lispref/frames.texi (Mouse Tracking): Document the special
effect of setting 'track-mouse' to 'dragging'.
* lisp/textmodes/artist.el (artist-mouse-draw-continously):
* lisp/ruler-mode.el (ruler-mode-mouse-drag-any-column-iteration):
* lisp/mouse-drag.el (mouse-drag-throw):
* lisp/mouse.el (mouse-drag-line): Set 'track-mouse' to 'dragging'
to avoid changes in the shape of the mouse pointer.
* src/xdisp.c (define_frame_cursor1): Don't change the mouse
pointer shape when do_mouse_tracking has the value of 'dragging',
not just any non-nil value. (Bug#20934)
(syms_of_xdisp): DEFSYM 'dragging'.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/frames.texi | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index ddf81f3e805..79b5172ae0b 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi | |||
| @@ -2018,6 +2018,19 @@ The value of @code{track-mouse} is that of the last form in @var{body}. | |||
| 2018 | You should design @var{body} to return when it sees the up-event that | 2018 | You should design @var{body} to return when it sees the up-event that |
| 2019 | indicates the release of the button, or whatever kind of event means | 2019 | indicates the release of the button, or whatever kind of event means |
| 2020 | it is time to stop tracking. | 2020 | it is time to stop tracking. |
| 2021 | |||
| 2022 | The @code{track-mouse} form causes Emacs to generate mouse motion | ||
| 2023 | events by binding the variable @code{mouse-tracking} to a | ||
| 2024 | non-@code{nil} value. If that variable has the special value | ||
| 2025 | @code{dragging}, it additionally instructs the display engine to | ||
| 2026 | refrain from changing the shape of the mouse pointer. This is | ||
| 2027 | desirable in Lisp programs that require mouse dragging across large | ||
| 2028 | portions of Emacs display, which might otherwise cause the mouse | ||
| 2029 | pointer to change its shape according to the display portion it hovers | ||
| 2030 | on (@pxref{Pointer Shape}). Therefore, Lisp programs that need the | ||
| 2031 | mouse pointer to retain its original shape during dragging should bind | ||
| 2032 | @code{track-mouse} to the value @code{dragging} at the beginning of | ||
| 2033 | their @var{body}. | ||
| 2021 | @end defspec | 2034 | @end defspec |
| 2022 | 2035 | ||
| 2023 | The usual purpose of tracking mouse motion is to indicate on the screen | 2036 | The usual purpose of tracking mouse motion is to indicate on the screen |