Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wl-copy --clear does not clear primary clipboard #118

Closed
hegerj opened this issue Aug 3, 2021 · 5 comments
Closed

wl-copy --clear does not clear primary clipboard #118

hegerj opened this issue Aug 3, 2021 · 5 comments
Labels
not our bug The issue is in some other piece of software involved

Comments

@hegerj
Copy link

hegerj commented Aug 3, 2021

Only way how I can clear primary clipboard is by using wl-copy -p "".
Is that intended?

@bugaevc
Copy link
Owner

bugaevc commented Aug 3, 2021

wl-copy --clear clears the regular clipboard, wl-copy --clear --primary clears the primary one. Or are you saying that's not working?

@hegerj
Copy link
Author

hegerj commented Aug 3, 2021

Correct. Neither just --clear nor --clear --primary clears the clipboard.
Example:

[user@fedora ~]$ wl-copy --primary "aaa"
[user@fedora ~]$ wl-paste --primary
aaa
[user@fedora ~]$ wl-copy --clear --primary
[user@fedora ~]$ wl-paste --primary
aaa
[user@fedora ~]$ wl-copy --clear
[user@fedora ~]$ wl-paste --primary
aaa

Environment is Fedora 34 KDE wayland, wl-clipboard-2.0.0-4.fc34.x86_64.

@bugaevc
Copy link
Owner

bugaevc commented Aug 3, 2021

Environment is Fedora 34 KDE wayland, wl-clipboard-2.0.0-4.fc34.x86_64.

Thanks, that's helpful. Could you also attach WAYLAND_DEBUG logs? I.e., do this:

In one terminal:

$ WAYLAND_DEBUG=1 wl-copy --foreground --primary aaa

Then in another:

$ WAYLAND_DEBUG=1 wl-copy --foreground --primary --clear

Then tell me what it prints.

@bugaevc
Copy link
Owner

bugaevc commented Aug 3, 2021

Even without looking at the logs, I think I know what it is: it's KDE's built-in clipboard manager trying to persist the clipboard contents. So wl-copy succeeds in clearing the primary clipboard, but then KDE's clipboard manager puts the same contents there again.

If that's what it is, then it can be considered a bug in KDE. Please report it to them, and point them here if they're looking for a way to solve it.

@bugaevc
Copy link
Owner

bugaevc commented Aug 5, 2021

Closing as not-our-bug; please reopen if you do get a WAYLAND_DEBUG log and it indicates something different.

@bugaevc bugaevc closed this as completed Aug 5, 2021
@bugaevc bugaevc added the not our bug The issue is in some other piece of software involved label Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not our bug The issue is in some other piece of software involved
Projects
None yet
Development

No branches or pull requests

2 participants