all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 19988@debbugs.gnu.org
Subject: bug#19988: 25.0.50; Drag events ending in different frame
Date: Thu, 05 Mar 2015 08:19:28 +0100	[thread overview]
Message-ID: <87oao79ain.fsf@gnu.org> (raw)
In-Reply-To: <8361agp10p.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 05 Mar 2015 05:37:58 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> >> And that situation is already covered as one would expect.
>> >
>> > What do you mean by "as one would expect"?  On my machine, the
>> > behavior is unreasonable: the wrong part of text is selected.
>> 
>> When I select a region by dragging Mouse-1 starting at the "selected."
>> above, as soon as the mouse cursor leaves the emacs frame, the region
>> won't grow or shrink anymore until I enter the frame and window again.
>> And when I release the drag outside of the frame and window where I
>> started, the final region is the last one before leaving the
>> frame/window.  That's pretty much what I'd expect except that releasing
>> the drag outside of the start frame/window inactivates the region.
>
> I wish I saw something like that, but I don't.  Could be a Windows
> specific issue, though.
>
> In any case, that doesn't explain the "already covered" part: isn't
> that "covered" _because_ we return the initial frame as the end of
> drag?

Now I get a different behavior as described yesterday [1]: when my drag
is released outside of the frame where it startet, no region is selected
and the mark is set at the start position of the selected text.  I
really wonder why I got a different behavior.

Having the initial frame as the drag end has to do with that, indeed,
but only because (posn-point (event-end click)) returns nil in this case
(see `mouse-set-region').  If it had the window of another frame as drag
end instead, it would use as region the position in the start window and
the correspondence of the end in the target window in the source window.
That would be nonsense if both windows show a different buffer, but if
they showed the same buffer that could infact be quite reasonable and
convenient to select large regions without needing to scroll.  (Of
course, that won't work if my drag leaves the start window on top or at
the bottom which triggeres scrolling...)

Anyway, if drag events would return the actual end window even if that's
on another frame (and the start frame only in case the drag ended
external to emacs), then `mouse-set-region' would need to check if start
and end window are the same and else do nothing.  Doing that right now
wouldn't hurt either, as it would inhibit setting the mark at the start
of the region which won't be selected anyhow.

Bye,
Tassilo

[1] I only updated my emacs checkout just now but there seem to be no
relevant changes from yesterday morning's version.  And I did a
bootstrap yesterday evening...





  reply	other threads:[~2015-03-05  7:19 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-03 14:30 bug#19988: 25.0.50; Drag events ending in different frame Tassilo Horn
2015-03-03 20:27 ` Eli Zaretskii
2015-03-04  4:28   ` Stefan Monnier
2015-03-04  7:03     ` Tassilo Horn
2015-03-04 17:22       ` Eli Zaretskii
2015-03-04 21:09         ` Tassilo Horn
2015-03-04 22:58           ` Stefan Monnier
2015-03-05  8:05             ` martin rudalics
2015-03-05 17:05             ` Eli Zaretskii
2015-03-05  3:37           ` Eli Zaretskii
2015-03-05  7:19             ` Tassilo Horn [this message]
2015-03-05 17:02               ` Eli Zaretskii
2015-03-05 20:07                 ` Tassilo Horn
2015-03-05 20:15                   ` Eli Zaretskii
2015-03-06  7:12                     ` Tassilo Horn
2015-03-06 14:13                       ` Eli Zaretskii
2015-03-06 16:09                       ` Drew Adams
2015-03-06 18:55                         ` martin rudalics
2015-03-05 17:00             ` Eli Zaretskii
2015-03-05 20:01               ` Tassilo Horn
2015-03-05  8:05           ` martin rudalics
2015-03-04 17:19     ` Eli Zaretskii
2015-03-04 15:10 ` martin rudalics
2015-03-04 21:14   ` Tassilo Horn
2015-03-05  8:06     ` martin rudalics
2015-03-06 14:37       ` Stefan Monnier
2015-03-06 18:55         ` martin rudalics
2015-03-06 20:19           ` Stefan Monnier
2015-03-06 21:31             ` martin rudalics
2015-03-07  0:49               ` Stefan Monnier
2015-03-07  9:41                 ` martin rudalics
2015-03-09  4:34                   ` Stefan Monnier
2015-03-09  7:53                     ` Jan D.
2015-03-09 10:38                       ` martin rudalics

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oao79ain.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=19988@debbugs.gnu.org \
    --cc=eliz@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.