When starting Parsec on a Linux system, the local clipboard is corrupted when placing images, files or other items other than text. This issue results in the loss of data and makes it difficult for users to transfer data between different applications.
Steps to Reproduce:
Start Parsec on a Linux system.
Copy an image or any other non-text item to the clipboard.
Attempt to paste the copied item into another application.
Expected behaviour:
The copied item should be pasted as expected, without loss of data.
Actual behaviour:
The pasted item is replaced by the last copied text, and the image/file/... is lost.
Environment:
Operating System: All X11 system
Parsec version: All
libmatoya version: All
Additional Information:
The problem comes from the X11 stock api which has no event on clipboard modifications.
The libmatoya library, to work around this lack, retrieves the clipboard property each time it loses its ownership to another application. This is done to detect any modification of the clipboard content by other applications.
When the libmatoya library recovers the clipboard ownership, it puts back in the clipboard what was added by the previous application. However, when the content is read, it is converted to UTF-8, which results in data loss if the content is not textual.
As a result, the local clipboard is corrupted when non-textual items, such as images or files, are copied.
Problem Description:
When starting Parsec on a Linux system, the local clipboard is corrupted when placing images, files or other items other than text. This issue results in the loss of data and makes it difficult for users to transfer data between different applications.
Steps to Reproduce:
Expected behaviour:
The copied item should be pasted as expected, without loss of data.
Actual behaviour:
The pasted item is replaced by the last copied text, and the image/file/... is lost.
Environment:
Additional Information:
The problem comes from the X11 stock api which has no event on clipboard modifications. The libmatoya library, to work around this lack, retrieves the clipboard property each time it loses its ownership to another application. This is done to detect any modification of the clipboard content by other applications. When the libmatoya library recovers the clipboard ownership, it puts back in the clipboard what was added by the previous application. However, when the content is read, it is converted to UTF-8, which results in data loss if the content is not textual. As a result, the local clipboard is corrupted when non-textual items, such as images or files, are copied.