Subject: Re: bug#19988: 25.0.50; Drag events ending in different frame

From: Tassilo Horn <[email-masked]>
Date: Fri, 06 Mar 2015 08:12:14 +0100

Eli Zaretskii <[email-masked]> writes:

>> >> 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.
>> >
>> > That's not what I see.  For me, the region extension ends when the
>> > mouse goes out of the frame, and the region stays as it was at the
>> > last extension.
>> >
>> > Through which side of the frame do you exit the frame while dragging?
>> 
>> It doesn't matter, the behavior is as described above.  As said in my
>> other mail, I don't use scroll-bars.  But even with emacs -Q with
>> scroll-bars on the right compiled from commit cbc9d8d I have the same
>> behavior as above.
>
> So you are saying that you see the region extend to the edge of the
> text as long as you drag the mouse inside the frame, then shrink back
> when the mouse is dragged outside of the frame?

Not exactly.

  1. As long as I drag inside the start window, the region
     extends/shrinks.  When releasing the mouse button, the region is
     from the start point to the position where I released the button
     and is active, i.e., highlighted by tmm.

  2. When I drag into a different window of the left or right of the
     start window *showing the same buffer*, the region (highlighting)
     freezes at the position where the start window was left.  When I
     release the mouse button in the other window, the region suddenly
     resized from the start position to the end position of the other
     window.  That's actually a cool feature as it allows to select
     large regions without scrolling.

  3. When I drag into a different window on the right of the start
     window which shows a different buffer than the start window, the
     region (highlighting) freezes as soon as I leave the start window.
     When I release the mouse button, the region suddenly becomes
     start-position to top of the buffer.

  4. Doing the same as in 3. but dragging to the window on the left,
     when releasing the mouse button the region suddenly becomes start
     position to "somewhere above the end of the marked region which
     froze when leaving the start window", i.e., the region-end jumps
     up.  Sometimes even higher than the region-start, sometimes below
     it.  Sorry, I don't see any system here...

  5. Dragging outside of the frame (which has only one window) freezes
     the selected region as soon as the mouse leaves the frame.  It
     doesn't matter if I leave to the left or to the right.  When I then
     release the mouse button outside of the frame, the region vanishes
     and the mark is set at the start position of the drag.

So it seems you get a different behavior in at least case 5 (i.e., your
region doesn't vanish).  Not sure what might be the difference but I can
reproduce that using emacs -Q.

GNU Emacs 25.0.50.4 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.9) of
2015-03-06, commit bfebebbc72c6a6ea375c6e8ed7f8641b25439770

Bye,
Tassilo