Add flatpak support to dnd and copy/paste
With flatpak, different applications have different views of the file system, and thus, text/uri-list data needs to be rewritten on the fly. Concretely, what needs to happen when filename is passed from application A to application B is:
- Verify that A has access to the file (only relevant if A is sandboxed)
- Check if B has access to the file (only relevant if B is sandboxed) If yes, send it as-is If no, export the file in the document portal for B, and send the resulting url
Open questions:
- Elsewhere, we prove file access by sending an open fd - can we do that here ?
- Should the file be exported readonly ?
- Should it be exported permanently ?