16ccee7ac9
If you lock the screen in EndeavourOS, a signal KSystemClipboard:changed is emitted with empty text and clipboard mode QClipboard::Clipboard. Upon unlock the clipboard will be re-synced. A clipboard network packet will be sent for KSystemClipboard::changed signals if: 1. the received mode is QClipboard::Clipboard 2. the new content and its type are different from the current ones. The problem here is that, before locking the screen, current content is not empty. As of condition #2, a network packet with the empty text will be sent, which clears the current clipboard selection in GBoard but the contents stay the same. Upon re-sync in unlock, a packet will be sent again due to #2. This commit aims to fix this by ignoring empty text updates since from the end-user it unnecessarily clears the current clipboard selection and results in many "Copied to clipboard" toasts. |
||
---|---|---|
.. | ||
clipboard_config.cpp | ||
clipboard_config.h | ||
clipboard_config.ui | ||
clipboardlistener.cpp | ||
clipboardlistener.h | ||
clipboardplugin.cpp | ||
clipboardplugin.h | ||
CMakeLists.txt | ||
kdeconnect_clipboard.json | ||
kdeconnect_clipboard_config.qml | ||
README |
When the clipboard changes, it sends a package with type kdeconnect.clipboard and the field "content" (string) containing the new clipboard content. When it receivest a package of the same kind, it should update the system clipboard with the received content, so the clipboard in both devices always have the same content. This plugin is symmetric to its counterpart in the other device: both have the same behaviour.