From: Andrew Schein <andrew@andrewschein.com>
To: 9186@debbugs.gnu.org
Subject: bug#9186: patch for buggy drag behavior affecting emacs >=23
Date: Fri, 19 Aug 2011 09:00:05 -0700 [thread overview]
Message-ID: <CAE49FEebp8ra+hO0M+248FPy0x=o_4SxS=fGMyKUvXQEuT3MdA@mail.gmail.com> (raw)
In-Reply-To: <CAE49FEfR9Sqtms8Ww5XYVVhaQqRE9dGzspxD-PFMGSiB6ZeHqg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 916 bytes --]
This is a resend, since my patch appears mangled in the archives. I
am attaching the patch this time.
On Wed, Aug 17, 2011 at 9:13 AM, Andrew Schein <andrew@andrewschein.com> wrote:
> Below is my fix to bug#9186. I located the area of the C code that
> deals with recording click events and noticed that there is logic that
> looks for extremely precise pixel placement rather than buffer
> position. In my opinion this leads to unexpected behavior; humans can not
> move their hands so precisely as they can reliably move their mouse to
> the area defined by fuzz. On the other hand, there are plenty of cues
> to indicate when the mouse is placed back into the original position.
>
> In proposing this fix I am a a little concerned about how the overall
> system will be effected. Why was this click_fuzz logic introduced to
> begin with?
>
--
Andrew I. Schein
www.andrewschein.com
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1407 bytes --]
*** ./src/keyboard.c 2011-08-15 16:25:02.516887000 -0700
--- ../copy2/trunk/src/keyboard.c 2011-08-17 08:58:01.792927000 -0700
***************
*** 5630,5637 ****
event->modifiers |= click_modifier;
ignore_mouse_drag_p = 0;
}
! else if (EQ (Fcar (Fcdr (start_pos)), Fcar (Fcdr (position))))
! /* Mouse has returned to its original position. */
event->modifiers |= click_modifier;
else
{
--- 5630,5649 ----
event->modifiers |= click_modifier;
ignore_mouse_drag_p = 0;
}
! else if (xdiff < double_click_fuzz && xdiff > - double_click_fuzz
! && ydiff < double_click_fuzz && ydiff > - double_click_fuzz
! /* Maybe the mouse has moved a lot, caused scrolling, and
! eventually ended up at the same screen position (but
! not buffer position) in which case it is a drag, not
! a click. */
! /* FIXME: OTOH if the buffer position has changed
! because of a timer or process filter rather than
! because of mouse movement, it should be considered as
! a click. But mouse-drag-region completely ignores
! this case and it hasn't caused any real problem, so
! it's probably OK to ignore it as well. */
! && EQ (Fcar (Fcdr (start_pos)), Fcar (Fcdr (position))))
! /* Mouse hasn't moved (much). */
event->modifiers |= click_modifier;
else
{
next prev parent reply other threads:[~2011-08-19 16:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-28 4:56 bug#9186: drag copy buffer blown away by slight mouse movements on emacs 23.3.1 with GTK Andrew Schein
2011-08-17 16:13 ` bug#9186: patch for buggy drag behavior affecting emacs >=23 Andrew Schein
2011-08-19 16:00 ` Andrew Schein [this message]
2012-11-03 17:36 ` bug#9186: drag copy buffer blown away by slight mouse movements on emacs 23.3.1 with GTK Chong Yidong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAE49FEebp8ra+hO0M+248FPy0x=o_4SxS=fGMyKUvXQEuT3MdA@mail.gmail.com' \
--to=andrew@andrewschein.com \
--cc=9186@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).