Skip to content

Klipper Waylandclipboard: force offer of specific mimetype to fix pasting to gtk applications

Fabio Bas requested to merge ctrlaltca/plasma-workspace:fix_428075 into master

This is my first PR to KDE, so I apologize in advance if anything has not been done correctly on my part. This PR fixes https://bugs.kde.org/show_bug.cgi?id=428075 The problem is that when selecting an entry in Klipper, it can't actually be pasted to any gtk-based application; I used Firefox, xfce's Mousepad and Sublime Text as test applications. The problem is quite simple: Klipper only offers a single mimetype for plain text data: "text/plain". Gtk applications seems to be quite picky about it and requires an offer for "text/plain;charset=utf-8" in order to accept the data offer and receive it. This PR workarounds the issue by ensuring an additional "text/plain;charset=utf-8" mimetype is always offered for plain text clipboard contents. It then catches requests for this mimetype and routes them back to the "text-plain" way.

Merge request reports