[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 17:09:59 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> To simplify for the target.  It may also be that there are several
> pointer devices (indeed, on my laptop, I can use three mice at the same
> time), and the target can not know which one is used.

I've seen and used multiple mice, but they always all applied to the one and
only on-screen-cursor.  So from an Xclient point of view, there's really only
one input device (which is composed of several mice).
But that's irrelevant to the discussion.

> XdndStatus tells the source if the drop is accepted, and the above mentioned
> rectangle.  The source uses the accept/reject status to change the
> icon that is being dragged so the user can visually see if drop is
> accepted or rejected where the mouse is now.

Talk about stupid design: the user is obviously looking at the target while
dragging, so any indication should happen there rather than at the source.
It would also eliminate this need for constant XdndStatus communication.
I'm obviously missing something.

> Also, if the mouse button is released and the last XdndStatus said reject,
> the source usually does a bit of animation so the dragged icon is "snapped
> back" to where the drag started.

But that could be triggered by a XdndReject response to XdndDrop, so it
does not justify XdndStatus.
[ Don't take my comments too seriously: I understand you can't change any
  of it, I'm just trying to figure out how/why it was designed this way,
  so as to better understand how to use it.  If you get tired, just tell me
  to go read the docs.  Thanks already for your careful explanations. ]

> If we don't send any XdndStatus, the source will conclude that the
> target can not accept any drop whatsoever, and never send the XdndDrop
> message.  A dummy is no good, we at least needs to set accept/reject
> correctly.

Seems like `accept' would be a good dummy, if needed.

> The target does not get any button release info, the mouse
> is grabbed by the source.  The only indication the target gets about
> button release is the XdndDrop message, or an XdndLeave message if the
> drop was rejected by the last XdndStatus message.

OK, that part makes sense now, thank you.


reply via email to

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