Skip to content

Fix regression in copy/paste and DnD#2601

Merged
jeremypw merged 2 commits intomainfrom
jeremypw/dnd/fix-regression
Jun 20, 2025
Merged

Fix regression in copy/paste and DnD#2601
jeremypw merged 2 commits intomainfrom
jeremypw/dnd/fix-regression

Conversation

@jeremypw
Copy link
Contributor

@jeremypw jeremypw commented Jun 19, 2025

Fixes #2602

Fixes regression caused by #2595

No idea how this got through - I am sure I tested it before committing (although its obvious from the final diff that it would not work).

Please recheck that all aspects of copy/paste and DnD work as expected (quotes are still not applied) - as will I.

Tests done with image and text files with spaces in the name.
[x] Drop image file into Github comment on Chrome works (Not on Firefox which inserts the filename)
[x] Drop image file onto Code text editor inserts filename (unquoted)
[x] Drop text file onto Code Welcome screen opens as doc
[x] Drop text file onto Code doc inserts filename (unquoted)
[x] Drop image file onto elementary Terminal shell inserts filename (quoted)
[x] Drop image file onto elementary Terminal tab navigates tab to parent folder
[x] Drop folder onto elementary Terminal tab navigates tab to folder
[x] Drop folder onto elementary Terminal add button opens new tab at folder
[ ] Drag and drop file onto its parent in Files fails on OS8/Wayland/VM but creates a link on OS7/X - is this expected?
[x] Copy paste file onto its parent creates a copy (renamed)
[x] Copy paste a file into another folder creates a copy (same name)
[x] Cut paste a file into another folder moves it

Any more tests required?

@jeremypw jeremypw added the Priority: Critical Causes Files to crash, hang or otherwise become unusable label Jun 19, 2025
@jeremypw jeremypw marked this pull request as ready for review June 19, 2025 09:19
@jeremypw jeremypw requested a review from a team June 19, 2025 09:19
@jeremypw jeremypw mentioned this pull request Jun 19, 2025
1 task
@zeebok
Copy link
Contributor

zeebok commented Jun 19, 2025

  • Drop image file into Github comment on Chrome works (Not on Firefox which inserts the filename)
  • Drop image file onto Code text editor inserts filename (unquoted)
  • Drop text file onto Code Welcome screen opens as doc
  • Drop text file onto Code doc inserts filename (unquoted)
  • Drop image file onto elementary Terminal shell inserts filename (quoted)
  • Drop image file onto elementary Terminal tab navigates tab to parent folder

^^^ This does cause a rapid succession of notifications since Files remains focused; might be nice to bypass the notifications or to pull focus in the future

  • Drop folder onto elementary Terminal tab navigates tab to folder

^^^ This does cause a rapid succession of notifications since Files remains focused; might be nice to bypass the notifications or to pull focus in the future

  • Drop folder onto elementary Terminal add button opens new tab at folder
  • Drag and drop file onto its parent

How did you test this? If I perform this drag and drop from one Files window to another, nothing happens. Drag and drop to the same parent folder on the side bar makes a copy

  • Copy paste file onto its parent creates a copy (renamed)
  • Copy paste a file into another folder creates a copy (same name)
  • Cut paste a file into another folder moves it

@zeebok
Copy link
Contributor

zeebok commented Jun 19, 2025

@jeremypw Did the testing, it seems pretty reliable for me on OS8/Wayland

@jeremypw
Copy link
Contributor Author

I'll check what the DnD behaviour on OS8/Wayland/VM was for an earlier (unbroken) release.

@jeremypw
Copy link
Contributor Author

V7.1.0 behaves the same for me when dragging onto its parent using OS8/Wayland in a VM - it fails. So its not due to recent changes and can be investigated later.

@jeremypw
Copy link
Contributor Author

I'll leave unmerged for a little while in case anyone else wants to hammer it. I'll merge tomorrow.

@jeremypw
Copy link
Contributor Author

Drag and drop onto parent works for Classic session on OS8 so there seems to be a bug somewhere in Gtk3/Wayland/VM in relation to DnD it seems a certain signal is not being generated.

@jeremypw
Copy link
Contributor Author

For some reason on Wayland the Gdk.Context associated with the drag does not include Gdk.DragAction.LINK whereas with X it does (the drag is set up in Code to allow linking). As linking is the only allowed action when dropping onto the same folder nothing happens in Wayland whereas a link is created in X 🤷

@jeremypw jeremypw merged commit 9a4411f into main Jun 20, 2025
4 checks passed
@jeremypw jeremypw deleted the jeremypw/dnd/fix-regression branch June 20, 2025 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Critical Causes Files to crash, hang or otherwise become unusable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copy/Paste and DnD no longer work after release v7.1.3

2 participants