|
From: | Jan D. |
Subject: | Re: Drag and drop patch for X, please review. |
Date: | Tue, 20 Jan 2004 17:24:37 +0100 |
If the frame is split vertically and text is dropped on the menu bar, thereis 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 samekind of code that Kim recently changed to report the full position info in mouse-click events: this code turns a scren pixel position into a 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), but a menu-bar is always linked to a particular window, so getting the relevantwindow 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. Consider
this setup with vertically split windows: -------------------------------------------- | File Edit Options Buffers Tools Help | -------------------------------------------- | window 1 |x| window 2 |x| 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.
[Prev in Thread] | Current Thread | [Next in Thread] |