From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: Drag and drop patch for X, please review. Date: Tue, 20 Jan 2004 17:24:37 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <23DA6486-4B65-11D8-91D5-00039363E640@swipnet.se> References: <200401171729.i0HHT1wq016912@stubby.bodenonline.com> <9616315C-49F9-11D8-A763-00039363E640@swipnet.se> <66F4EDBB-4AC4-11D8-BCBC-00039363E640@swipnet.se> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (Apple Message framework v609) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1074617436 13658 80.91.224.253 (20 Jan 2004 16:50:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 20 Jan 2004 16:50:36 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Jan 20 17:50:28 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Aiz59-0008Ek-00 for ; Tue, 20 Jan 2004 17:50:27 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Aiz59-0006bd-00 for ; Tue, 20 Jan 2004 17:50:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Aiz1R-0000Rn-MI for emacs-devel@quimby.gnus.org; Tue, 20 Jan 2004 11:46:37 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AiyyE-0008CU-Se for emacs-devel@gnu.org; Tue, 20 Jan 2004 11:43:18 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Aiyxe-000807-J7 for emacs-devel@gnu.org; Tue, 20 Jan 2004 11:43:14 -0500 Original-Received: from [213.115.192.53] (helo=mail2.norrnet.net) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Aiyh4-0003MN-N6; Tue, 20 Jan 2004 11:25:34 -0500 Original-Received: from stubby.bodenonline.com (stubby.bodenonline.com [193.201.16.94]) by mail2.norrnet.net (BorderWare MXtreme Mail Firewall) with ESMTP id F31A940DBD; Tue, 20 Jan 2004 17:22:22 +0100 (CET) Original-Received: from accessno42.bodenonline.com (accessno42.bodenonline.com [193.201.16.44]) by stubby.bodenonline.com (8.12.1/8.12.1) with ESMTP id i0KHHj7L002543; Tue, 20 Jan 2004 18:17:46 +0100 In-Reply-To: Original-To: Stefan Monnier X-Mailer: Apple Mail (2.609) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19354 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19354 >> If the frame is split vertically and text is dropped on the menu bar,=20= >> there >> is a bit coordinate calculations to be made to determine which window >> to use. > > I don't know enough to understand I guess. I assume you'd use the = same > kind of code that Kim recently changed to report the full position=20 > info in > mouse-click events: this code turns a scren pixel position into a=20 > bunch of > "logical position" info: window, buffer-pos, ... > > Now, when dropping on the menu-bar, I don't know what DND should do (I > can't think of any meaningful operation that you could carry this way, > unless you could drop not just on the menu-bar but on a menu-entry),=20= > but > a menu-bar is always linked to a particular window, so getting the=20 > relevant > window is a small matter of finding the active window of the frame. Dropping a file name on the menu bar currently opens the file in a new window. I think that is useful (i.e. I use it all the time :-) But the active window is probably not where the drop should go. =20 Consider this setup with vertically split windows: -------------------------------------------- | File Edit Options Buffers Tools Help | -------------------------------------------- | window 1 |x|=A0 window 2 |x|=A0 window 3 |x| -------------------------------------------- |x| represents a scroll bar. If dropping text onto File, the user might reasonable expect the text to be pasted into window 1, because it is closest. Dropping on Tools can be expected to paste the text into window 3. But the selected window may be window 1, but I think it would be strange to paste into window 1 when the drop is clearly made closer to window 3. And what about dropping on the 'e' in Buffers? It is the same distance to window 2 and window 3. Remember that drag and drop is very visual, and where the drop does occur is where the action should happen. To say that the menu bar is associated with window 1 and do all drops there would be confusing for a user. So while dropping just about anywhere makes sense when used to open a file, it is more problematic for pasting in text. Jan D.