all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#19885: 24.4; "XdndDrop" event does not reach `x-dnd-handle-drag-n-drop-event' when dragging from Chromium
@ 2015-02-17 11:27 Oleh Krehel
  2015-02-21 14:11 ` Jan D.
  0 siblings, 1 reply; 2+ messages in thread
From: Oleh Krehel @ 2015-02-17 11:27 UTC (permalink / raw)
  To: 19885

Here are my system parameters:

In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.6)
 of 2015-02-03 on firefly
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description:	Ubuntu 14.04.1 LTS

When dragging an image link from e.g. Firefox, everything works fine,
"XdndDrop" event is received.

However, when dragging the same link from Chromium, this event is never
received. Other events, like "XdndEnter", "XdndPosition" and "XdndLeave"
are received from both browsers.

I'm not sure if Emacs is the cause, it could be Chromium's fault for not
sending the event. Maybe someone with more knowledge could look at this.

Slightly related, I'd also like to know why sometimes the DND
transaction gets stuck while I'm debugging something in Emacs. Then, I'm
unable to start a new DND from Firefox unless I restart Firefox. Could
something be done on Emacs side to prevent this?





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#19885: 24.4; "XdndDrop" event does not reach `x-dnd-handle-drag-n-drop-event' when dragging from Chromium
  2015-02-17 11:27 bug#19885: 24.4; "XdndDrop" event does not reach `x-dnd-handle-drag-n-drop-event' when dragging from Chromium Oleh Krehel
@ 2015-02-21 14:11 ` Jan D.
  0 siblings, 0 replies; 2+ messages in thread
From: Jan D. @ 2015-02-21 14:11 UTC (permalink / raw)
  To: Oleh Krehel; +Cc: 19885-done

Hi.

> 17 feb 2015 kl. 12:27 skrev Oleh Krehel <ohwoeowho@gmail.com>:
> 
> Here are my system parameters:
> 
> In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.6)
> of 2015-02-03 on firefly
> Windowing system distributor `The X.Org Foundation', version 11.0.11501000
> System Description:	Ubuntu 14.04.1 LTS
> 
> When dragging an image link from e.g. Firefox, everything works fine,
> "XdndDrop" event is received.
> 
> However, when dragging the same link from Chromium, this event is never
> received. Other events, like "XdndEnter", "XdndPosition" and "XdndLeave"
> are received from both browsers.
> 
> I'm not sure if Emacs is the cause, it could be Chromium's fault for not
> sending the event. Maybe someone with more knowledge could look at this.

Chromium is buggy, it ignores action XdndActionPrivate, which Emacs returns by default.
The XDND specification (http://www.newplanetsoftware.com/xdnd/) says:

"The special action XdndActionPrivate tells the source that the target will do something that the source doesn't understand and that won't require anything from the source other than a copy of the data."

But Chromium does not offer a copy of the data.  If we change the action to XdndActionCopy, Chromium works as Firefox.

You can make a function like this

(defun my-x-dnd-test-function (_window _action types)
  "X-DND test function that returns copy instead of private as action
Otherwise the same as the default function"
  (let ((type (x-dnd-choose-type types)))
    (when type (cons 'copy type))))

and customize x-dnd-test-function to my-x-dnd-test-function if you wan't Chromium to behave.

> 
> Slightly related, I'd also like to know why sometimes the DND
> transaction gets stuck while I'm debugging something in Emacs. Then, I'm
> unable to start a new DND from Firefox unless I restart Firefox. Could
> something be done on Emacs side to prevent this?

When dragging, the mouse is grabbed and possibly the server.  XDND requires answers to be returned in a timely fashon.  If you debug, I guess Firefox gets out of trach when it does not get answers.  Thats why dnd is hard to debug, you must rely on print-outs in the code.

Closing as there is no Emacs bug here.

	Jan D.







^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-21 14:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-17 11:27 bug#19885: 24.4; "XdndDrop" event does not reach `x-dnd-handle-drag-n-drop-event' when dragging from Chromium Oleh Krehel
2015-02-21 14:11 ` Jan D.

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.