Repository navigation
fix(clipboard): offer and read the file-manager clipboard formats - #2040
Merged
Merged
Conversation
Copy and cut only put a GdkFileList on the clipboard, which GTK serializes as text/uri-list. Nemo, Caja, Thunar and the Desktop Icons NG extension paste only from x-special/gnome-copied-files, so Strata's copies could not be pasted there, and KDE never saw a cut. Publish a union of the file list, text/uri-list, the GNOME format with its copy/cut header, and the KDE cut flag. On paste, read the GNOME header or the KDE flag so a cut made in another file manager moves instead of copying. The QA clipboard_set step now takes raw MIME offers and the clipboard step reads one MIME type, so scenarios can drive both directions.
This was referenced Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Copy and cut only put a
GdkFileListon the clipboard, which GTK advertises astext/uri-listand plain text. Nemo, Caja, Thunar and the Desktop Icons NG extension (the version Ubuntu 24.04 and Zorin 18 ship) enable Paste only whenx-special/gnome-copied-filesis offered, so files copied in Strata could not be pasted into them. KDE readstext/uri-listbut takes its cut flag fromapplication/x-kde-cutselection, so a Strata cut pasted in Dolphin as a copy. Nautilus falls back to the file list, which is why stock GNOME never showed the problem.Copy and cut now publish a union of the file list,
text/uri-list, the GNOME format with itscopy/cutheader, and the KDE cut flag. Paste reads the GNOME header or the KDE flag first, so a cut made in another file manager moves instead of copying; Strata's own cut tracking is unchanged.The QA
clipboard_setstep accepts raw MIME offers and theclipboardstep reads one MIME type from the second display connection, so the new scenarios check both directions:copy-offers-file-manager-formatsreads the three payloads after Ctrl+C and Ctrl+X, andpaste-honors-foreign-cut-markerspastes clipboards filled the way Nemo/Nautilus and KDE fill them.The second point in #2028, launching
.desktopentries from the browser, is a separate defect and is not part of this change.Visual evidence
N/A. The change is clipboard content; the visible effect is Paste becoming enabled in other file managers.
How to test
Expected result: Paste is enabled and copies the file in step 2. Step 3 moves the file. Step 4 moves the file instead of copying it; a copy in the other file manager still copies.
Related issue
Closes #2028
Closes #2034