Apache OpenOffice (AOO) Bugzilla – Issue 79620
Implement Drag&Drop for OOo on Mac OS X
Last modified: 2009-02-10 08:08:26 UTC
See summary
Will be implemented on cws macosxdnd
tra: Just detected a major issue while trying to implement a first prototype. The OOo D&D protocol requires that the drag initiating method 'XDragSource::startDrag' need to return immediately and just triggers the real drag tracking functionality asynchronously. Asynchronously means running a new thread which actually starts the drag tracking. Unfortunately secondary threads do not receive user events on Mac OS X ergo we have a problem. :( Atm there seems to be no easy fix in sight. I have to discuss this with pl and obr.
@pl,obr: "Houston we've got a problem" see description above. We need to discuss how to solve this issue.
On all other platforms we are asynchronous; we could of course make startDrag there synchronous by simply making it wait on the other thread till it's done, rescheduling all the time (which one cannot do currently in a UNO component, but I digress :-) ). The big question is, what would the implications be ? Would there be massive code changes necessary for every instance of startDrag ?
tra->pl: Talked to obr about the issue already - conclusion lets try it synchronously and see what happens. Oliver and Hennes think that rvp was the reason for the current design choice. So far nobody (in theory) can rely on the fact that he'll have the chance to execute something after having called 'starDrag' because its not predictable when the scheduler will select this thread again but that's the theory - lets see what the reality will tell us. ;) I was able to drag something into another app already at least. :)
FYI: you probably need a window handle for startDrag ? Currently you get nothing which changes in CWS macosxquicktime01; you'd be able to get a Cocoa NSView* then.
tra->pl: Right I will need a window handle. Can you provide me one but pls earlier than with macosxquicktime01 that sounds a little bit too late to me if I look at the due date of this cws. I'd like to resync my cws to aquavcl03 soon and continue implementing D&D in Cocoa. As far as I have seen you always need a window handle to start D&D with Cocoa. That's different from Carbon.
I can merge the changes in aquavcl04. However I'm also not sure when that will get integrated (probably still some weeks), so it might be best if you join the changes into your CWS.
*** Issue 83543 has been marked as a duplicate of this issue. ***
The clipboard code has been changed to use Cocoa entirely. Volunteers who would like to test the new implementation are very welcome. All changes for this first step towards D&D have been comitted on cws macosxdnd.
First version of Cocoa -based DnD has been checked-in now. Check out dtrans and vcl. Nothing is perfect yet but on a good way.
The code is now almost complete. The last missing thing is support for file list so that dragging and dropping files to OOo opens them. However the currently checked-in code is ready for early testing and feedback! Please test it.
Experimental support for FileList has been integrated but needs finalization yet. Need to discuss with pl.
Fixed on cws 'macosxdnd'.
Please verify this on cws 'macosxdnd'
*** Issue 86239 has been marked as a duplicate of this issue. ***
Drag&Drop got into the release about a year ago. Closing resolved issue.