GNU bug report logs - #20804
24.4; XdndDrop does not use time stamp

Previous Next

Package: emacs;

Reported by: Urs Fleisch <urs.fleisch <at> gmail.com>

Date: Sat, 13 Jun 2015 18:43:01 UTC

Severity: normal

Tags: patch

Found in version 24.4

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Urs Fleisch <urs.fleisch <at> gmail.com>
Cc: 20804 <at> debbugs.gnu.org
Subject: bug#20804: 24.4; XdndDrop does not use time stamp
Date: Thu, 01 Aug 2019 23:40:06 +0200
Urs Fleisch <urs.fleisch <at> gmail.com> writes:

[...]

> However, I think that also the behavior of Emacs could
> be improved. It does not use the time stamp which can be found in the
> XdndDrop message when requesting the selection. The XDND specification
> <http://www.newplanetsoftware.com/xdnd/> states:
>
> XdndDrop
>
> Sent from source to target to complete the drop.
>
>     data.l[0] contains the XID of the source window.
>     data.l[1] is reserved for future use (flags).
>     data.l[2] contains the time stamp for retrieving the data. (new in
>     version 1)
>
> When passing the value found in data.l[2] as the optional time stamp
> argument to x-get-selection-internal, dropping from Qt 5 works with
> Emacs. I have attached a patch fixing this.
>
> ~~~~
> --- x-dnd.el.orig	2015-06-13 09:52:02.999811917 +0200
> +++ x-dnd.el	2015-06-13 09:53:30.808247335 +0200
> @@ -496,10 +496,12 @@
>  	((equal "XdndDrop" message)
>  	 (if (windowp window) (select-window window))
>  	 (let* ((dnd-source (aref data 0))
> +		(timestamp (aref data 2))
>  		(value (and (x-dnd-current-type window)
>  			    (x-get-selection-internal
>  			     'XdndSelection
> -			     (intern (x-dnd-current-type window)))))
> +			     (intern (x-dnd-current-type window))
> +			     timestamp)))
>  		success action)

(I'm going through old bug reports that have unfortunately not gotten
any responses.)

I'm not really familiar with how drag and drop works, but I think this
sounds like it makes sense.  Does anybody else with more knowledge (than
me) about this area think so too?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 5 years and 161 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.