KDE (or X?) clipboard goes stupid

René J.V. Bertin rjvbertin at gmail.com
Tue Apr 2 09:27:46 BST 2019

On Monday April 01 2019 13:53:18 Jerome Yuzyk wrote:

>Both X and KDE clipboards are messed again, after 57 days of uptime. Ctrl-X 
>will cut, but Ctrl-V pastes whatever was left by the last non-KDE Ctrl-V (like 
>from Chrome). The X clipboard is not filled by highlighting either. This 
>happens to the main KDE apps I use: KMail, Konqueror, Konsole, and KAlarm. It 
>does not happen to non-KDE apps like SeaMonkey or Chrome. It's damned annoying 
>and ongoing for years.

Now that's interesting: I'm seeing exactly the same thing when I run Qt5 apps under X11 on Mac. I've always written that off to something non-standard in XQuartz in combination with the fact that the xcb QPA is not officially supported on Mac. 

However, I find that I don't need to restart my entire X11 session, just restarting the affected Qt applications is enough.

I've never seen it under Linux before. I'm attaching a little patch I apply to Qt (5.9), in case you can build Qt yourself.  It doesn't solve anything but it helps to get some information about the error when the issue triggers. If you get comparable error output it would be good to file a bug report.

>From what I recall, Qt uses a hidden window that is opened just once that will act as the owner of clipboard content, so that that content can be removed when you quit the application. Something goes wrong at that level, causing our issue.

I've never really seen the point for making clipboard wiping-on-exit the default and GTk applications clearly have a different more robust way to do this :(

>Does anyone have any idea how to "reset" KDE's clipboard management without 
>logging in/out?

If indeed you have the same issue (and restarting affected applications fixes things) then it's not a KDE problem. BTW, the Plasma-devel ML may be a more appropriate place to discuss this, for the feature that's involved here, but also because there will be devs there who may actually understand the details of Qt's clipboard management.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-xcbclipboard-debugging.diff
Type: text/x-patch
Size: 4134 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde/attachments/20190402/2ac7f6a4/attachment.bin>

More information about the kde mailing list