Hi, I hope this is the correct way to address an issue I have with lipstick on SailfishOS for quite a while (basically since the first version). The problem is a stucked clipboard that does not update its contents anymore. A lipstick restart fixes the issue. The other method to "unstuck" the clipboard would be to execute an application which uses QClipboard::clear() method and then executes the copy like setText() or setMimeData(). Fingerterm for example uses that copy method and is able to unstuck the clipboard in lipstick.
I don't know where the actual bug now is (it might be the wayland backend but I honestly don't know much about it and can only speculate here) but I think as a workaround lipstick should also clear the clipboard before executing setMimeData. I wrote a little patch against master branch of lipstick that should be worth testing (see attachment) Greetings Leszek Lesner
diff --git a/src/compositor/lipstickcompositor.cpp b/src/compositor/lipstickcompositor.cpp index 0f5d370..fa1d198 100644 --- a/src/compositor/lipstickcompositor.cpp +++ b/src/compositor/lipstickcompositor.cpp @@ -211,6 +211,7 @@ void LipstickCompositor::retainedSelectionReceived(QMimeData *mimeData) foreach (const QString &format, mimeData->formats()) m_retainedSelection->setData(format, mimeData->data(format)); + QGuiApplication::clipboard()->clear(); QGuiApplication::clipboard()->setMimeData(m_retainedSelection.data()); }