[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drag and drop patch for X, please review.

From: Stefan Monnier
Subject: Re: Drag and drop patch for X, please review.
Date: 20 Jan 2004 16:12:05 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> Later when the mouse moves, the source sends XdndPosition messages,
> which among other things, contains the suggested action the source
> wants to do. The target replies with XdndStatus messages.  The answer
> contains among other things, the action the target wants to perform (copy,
> move, private) and if it is acceptable to drop where the mouse is currently.

Why does the source app send XdndPosition (rather than the target app
keeping track of mouse movements) ?  Is suh an XdndPosition message sent
every time the mouse moves within the target's window ?
What is the purpose of the XdndStatus message?  I.e. how does the source
use this information?  I can see its usefulness once the drop actually
takes place, but during dragging I can't think of anything useful the
source could do with it.

> So if the mouse travels from the menu bar, to the tool bar, to a read
> only buffer, to an ordinary buffer, and then to a dired buffer, and then
> we do the drop, Emacs must send XdndStatus messages back to the source
> with different actions in them.

What happens if it just always sends some dummy XdndStatus message instead?
What happens if it waits for the button-release before sending any XdndStatus?

>> Obviously, if there's no binding for the drop event at the drop location,
>> you should not accept the drop action.  So view-mode could explicily
>> unbind the drop event, for example.

> As can be seen above, we need to know this before the drop occurs.

That's OK: we can lookup keymaps during the drag to figure out whether
dnd-drop is bound at the location under the mouse.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]