From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.bugs Subject: bug#19988: 25.0.50; Drag events ending in different frame Date: Thu, 05 Mar 2015 08:19:28 +0100 Message-ID: <87oao79ain.fsf@gnu.org> References: <87k2yycfwh.fsf@gnu.org> <83r3t5q11o.fsf@gnu.org> <87mw3tfdn8.fsf@gnu.org> <83mw3sptht.fsf@gnu.org> <87egp44gh5.fsf@gnu.org> <8361agp10p.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1425540025 20785 80.91.229.3 (5 Mar 2015 07:20:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Mar 2015 07:20:25 +0000 (UTC) Cc: 19988@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 05 08:20:14 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YTQ4q-0004cf-I8 for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Mar 2015 08:20:12 +0100 Original-Received: from localhost ([::1]:48724 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTQ4p-0006sH-Rf for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Mar 2015 02:20:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTQ4m-0006m4-1u for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2015 02:20:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTQ4h-0005nv-1I for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2015 02:20:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTQ4g-0005nm-UQ for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2015 02:20:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YTQ4g-0004Wx-IW for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2015 02:20:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tassilo Horn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Mar 2015 07:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19988 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19988-submit@debbugs.gnu.org id=B19988.142553997617375 (code B ref 19988); Thu, 05 Mar 2015 07:20:02 +0000 Original-Received: (at 19988) by debbugs.gnu.org; 5 Mar 2015 07:19:36 +0000 Original-Received: from localhost ([127.0.0.1]:35431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YTQ4F-0004WA-EV for submit@debbugs.gnu.org; Thu, 05 Mar 2015 02:19:35 -0500 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:58115) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YTQ49-0004Vv-KC for 19988@debbugs.gnu.org; Thu, 05 Mar 2015 02:19:33 -0500 Original-Received: from thinkpad-t440p (dhcp27.uni-koblenz.de [141.26.71.27]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTPSA id 642471A8493; Thu, 5 Mar 2015 08:19:28 +0100 (CET) In-Reply-To: <8361agp10p.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 05 Mar 2015 05:37:58 +0200") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:100081 Archived-At: Eli Zaretskii 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...