[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] sqUnixXdnd: Don't record SQDragLeave when XdndDrop is handled (#508)

Christoph Thiede notifications at github.com
Tue Aug 18 12:15:53 UTC 2020

Hi David,

thanks for your interest and sorry for the delay, I was on holiday!

> what exactly did you test please ?

As you wrote, you can drag a file into the image and an external drop handler will handle it (or a dialog window will appear if there are multiple handlers). You can also drag multiple files into the image and they will be processed sequentially. So this is the only "acceptance test" I did so far.

>From a lower-level perspective, you can manipulate `HandMorph >> #generateDropFilesEvent:` and insert a `Transcript showln: {dragType. numFiles}.` somewhere to watch the exact events generated by the VM. This PR removes duplicate/wrong events from the recorded list. You can also make sure that the following works:

- drag a file over the image, but do not drop it, then drag it away - does the image still work?
- after that, drag another file into the image and drop it - is the correct file displayed?
- try to drag some text into the image - this attempt should be rejected but the image should still accept other files after that

> But essentially I wonder (from the discussion) so far, what you are trying, to change with this dnd PR and how I could try to test it.

In the first step, I only cleaned up the list of DND events generated by the X11 OSVM as described in the PR message. Depending on this PR, I am extending `#generateDropFilesEvent:` to also process the `DragMove` and `DragLeave` events. This allows it not only to drag files into the world itself but wrap them into a Squeak-like TransferMorph that can be dropped into morph or tool by reusing the existing `#acceptDroppingMorph:` interface. For example, you can drop a file directly into the Workspace without any other modifications. Marcel's idea! :-)

> I don't seem to be able to drag anything out of Squeak.

That's right, it might have worked on some platform in some ancient past, but nowadays it does not appear to work. But this would be interesting next steps, as well as dragging non-file stuff such as text or images into the image. Stay tuned! :-)


You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20200818/1d6db2ba/attachment.html>

More information about the Vm-dev mailing list