| Summary: | Clipboard.SetSelection only works with "text/plain" mime_type | ||
|---|---|---|---|
| Product: | [Plasma] xdg-desktop-portal-kde | Reporter: | adaha |
| Component: | general | Assignee: | Plasma Bugs List <plasma-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | aleixpol, kde |
| Priority: | NOR | ||
| Version First Reported In: | 6.5.1 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| See Also: | https://bugs.kde.org/show_bug.cgi?id=511989 | ||
| Latest Commit: | https://invent.kde.org/frameworks/kguiaddons/-/commit/20b032c87b8d15228d99d162818e51c216054010 | Version Fixed/Implemented In: | 6.20 |
| Sentry Crash Report: | |||
|
Description
adaha
2025-11-14 12:39:55 UTC
Doesn't this depend on the side wanting to read the data? We dont have code special casing mimetypes in the portal for what it's worth, it's either lower in the stack or the process reading the clipboard. I would assume (In reply to David Redondo from comment #1) > Doesn't this depend on the side wanting to read the data? Yeah that is what I would assume. Maybe I'm just misunderstanding the protocol and have implemented things incorrectly, but this is how things happen with my current setup: 1. I call SetSelection and set mime_types to ["text/plain;charset=utf-8", "text/plain"]. 2. Directly after calling SetSelection, the SelectionTransfer signal is emitted, where the mime_type is always "text/plain". Is the transfer supposed to be instant? My guess would be that, just as you say, an application makes a request for an available mime type, which then should trigger a transfer. the clipboard manager will instantly request the data. Alright got it, thanks for clarifying. Are you able to get a SelectionTransfer signal with mime_type set to "text/plain;charset=utf-8" in SetSelection? It just won't work in my testing :/ I can reproduce, it should be fixed already by https://invent.kde.org/frameworks/kguiaddons/-/commit/20b032c87b8d15228d99d162818e51c216054010 Oh, I did not notice that it had already been fixed. I will patch and test again, thanks! Ok so I just tested with xdg-desktop-portal-kde-d64493551ba28dd0b73dfdddd51d3efa41caa4da The issue still remains for me: 1. Call SetSelection with mime_types = [ "text/plain;charset=utf-8" ] 2. I never get a SelectionTransfer signal 1. Call SetSelection with mime_types = [ "text/plain;charset=utf-8", "text/plain" ] 2. SelectionTransfer is always called with mime_types = "text/plain". Do you have a setup where SelectionTransfer works with utf-8? Hi, the fix was only released on friday with frameworks 6.20. I just tested and with that I get SelectionTransfer with utf8. I am gonna close it as fixed. Just ran an update, work fine now. Thanks! |