! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Copy/Paste depends on Thunar instance running
Status:
RESOLVED: FIXED
Priority:
Very High
Severity:
blocker

Comments

Description Zenwalk 2010-12-21 10:41:22 CET
1st case :

Right-click on a file on the desktop -> "Copy"
Open Thunar on any folder
In thunar, right-click : the "Paste" menu item is disabled, file from the desktop has not been selected for Copying

2nd case :
Open Thunar on any folder
Right-click on a file on the desktop -> "Copy"
In thunar, right-click : "Paste" menu item is enabled, the file has properly been selected for Copying
Comment 1 Jannis Pohlmann editbugs 2010-12-21 11:39:41 CET
I can reproduce it on my machine.
Comment 2 Jannis Pohlmann editbugs 2011-01-10 23:46:36 CET
That might be a bug in Thunar but I'm not sure about it. Perhaps the X11 clipboard only works if the target app is running when stuff is copied into the clipboard? Need to further investigate this issue.
Comment 3 Nick Schermer editbugs 2011-01-31 15:25:50 CET
Thunar probably takes the ownership of the clipboard and starts watching it, and xfdesktop waits until the data is requested. But why don't you copy the uris to the clipboard in xfdesktop (for both copy and cut) and don't do stuff with ownership, that should work right? If the files are moved out the desktop folder, file monitoring will update the desktop.
Comment 4 Lionel Le Folgoc 2011-03-29 19:36:31 CEST
*** Bug 3854 has been marked as a duplicate of this bug. ***
Comment 5 Lionel Le Folgoc 2011-03-29 19:51:44 CEST
*** Bug 4301 has been marked as a duplicate of this bug. ***
Comment 6 Lionel Le Folgoc 2011-03-29 20:18:43 CEST
*** Bug 5010 has been marked as a duplicate of this bug. ***
Comment 7 Nick Schermer editbugs 2011-05-07 22:14:08 CEST
Maybe the patch in 7060 helps...
Comment 8 Brian J. Tarricone (not reading bugmail) 2011-09-26 10:33:22 CEST
(In reply to comment #3)
> Thunar probably takes the ownership of the clipboard and starts watching it,
> and xfdesktop waits until the data is requested. But why don't you copy the
> uris to the clipboard in xfdesktop (for both copy and cut) and don't do stuff
> with ownership, that should work right? If the files are moved out the desktop
> folder, file monitoring will update the desktop.

I think you guys misunderstand how the clipboard works.  You don't ever copy anything to the clipboard.  Ever.  There's no such thing as a clipboard as a data store.  It's just an X selection.  The 'copy' function is just your app saying "I have data that someone might be able to paste" by asserting ownership of the CLIPBOARD selection.  If someone wants to paste, they check if there's a CLIPBOARD selection owner, see if the data advertised by the owner is a format the app can support, and then asks the owner of the selection to send it the data.

This is why the (hack, IMO) of clipboard managers is (sometimes considered) necessary: if you "copy" some data in one app, and then quit that app, the data disappears with the app.  A clipboard manager's job is just to sit there and watch for CLIPBOARD selection ownership changes, and preemptively request the data from the app, so the data is still available if the app quits.

If Thunar is asserting CLIPBOARD ownership on startup, then that's a bug.  It should only be doing that in response to a user action.  It's also possible that the bug is simply that Thunar watches for SelectionNotify events to determine if 'Paste' should be enabled or not, but never does an initial check on startup to see if the clipboard is owned by an app that has data Thunar can paste.

I really don't think this is a bug in Xfdesktop.
Comment 9 Nick Schermer editbugs 2011-09-26 10:39:13 CEST
Over time I think various pieces of this problem are already fixed.

We do have a proper working clipboard manager again (that does what you say: wait until the owner is quitting, then take the data and become the new owner). Also backported in a 4.8 stable release.

The initial setup problem was also fixed some time ago in Thunar.

So overall this might just work now.
Comment 10 Brian J. Tarricone (not reading bugmail) 2011-09-26 10:40:48 CEST
Yeah, just tested this myself, and it works fine here.  Hehe.

Bug #7024

Reported by:
Zenwalk
Reported on: 2010-12-21
Last modified on: 2011-09-26
Duplicates (3):
  • 3854 copy-paste does not work like it should
  • 4301 cut paste problem
  • 5010 Copy/Cut & Paste Issues w/ xfdesktop 4.6 and JWM

People

Assignee:
Jannis Pohlmann
CC List:
10 users

Version

Version:
unspecified

Attachments

Additional information