[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/android b3054d69d88: Improve behavior of `restart-drag'
|
From: |
Po Lu |
|
Subject: |
feature/android b3054d69d88: Improve behavior of `restart-drag' |
|
Date: |
Wed, 19 Jul 2023 02:42:29 -0400 (EDT) |
branch: feature/android
commit b3054d69d88b9977052e889ed9134db4d69b8e97
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Improve behavior of `restart-drag'
* lisp/touch-screen.el (touch-screen-handle-point-up): If what
is `restart-drag' (meaning that a drag has been restarted but
the touchpoint has not moved), translate the release into a
regular mouse click to deactivate the region.
---
lisp/touch-screen.el | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/lisp/touch-screen.el b/lisp/touch-screen.el
index a9815dfc623..19b3d3b2cf4 100644
--- a/lisp/touch-screen.el
+++ b/lisp/touch-screen.el
@@ -707,11 +707,11 @@ POINT should be the point currently tracked as
PREFIX should be a virtual function key used to look up key
bindings.
-If the fourth element of `touch-screen-current-tool' is nil, move
-point to the position of POINT, selecting the window under POINT
-as well, and deactivate the mark; if there is a button or link at
-POINT, call the command bound to `mouse-2' there. Otherwise,
-call the command bound to `mouse-1'.
+If the fourth element of `touch-screen-current-tool' is nil or
+`restart-drag', move point to the position of POINT, selecting
+the window under POINT as well, and deactivate the mark; if there
+is a button or link at POINT, call the command bound to `mouse-2'
+there. Otherwise, call the command bound to `mouse-1'.
If the fourth element of `touch-screen-current-tool' is
`mouse-drag', then generate either a `mouse-1' or a
@@ -729,7 +729,11 @@ keyboard if the current buffer and the character at the
new point
is not read-only."
(let ((what (nth 3 touch-screen-current-tool))
(posn (cdr point)) window point)
- (cond ((null what)
+ (cond ((or (null what)
+ ;; If dragging has been restarted but the touch point
+ ;; hasn't been moved, translate the sequence into a
+ ;; regular mouse click.
+ (eq what 'restart-drag))
(when (windowp (posn-window posn))
(setq point (posn-point posn)
window (posn-window posn))
| [Prev in Thread] |
Current Thread |
[Next in Thread] |
- feature/android b3054d69d88: Improve behavior of `restart-drag',
Po Lu <=