| 219 | } |
| 220 | |
| 221 | void syncWithRemoteClipboard(bool force) { |
| 222 | using enum ClipboardContentType; |
| 223 | if ((!isAClearingAction() && clipboard_name == constants.default_clipboard_name && clipboard_entry == constants.default_clipboard_entry && action != Action::Status) |
| 224 | || force) { // exclude Status because it does this manually |
| 225 | ClipboardContent content; |
| 226 | if (envVarIsTrue("CLIPBOARD_NOREMOTE")) return; |
| 227 | content = getRemoteClipboard(); |
| 228 | if (content.type() == Text) { |
| 229 | convertFromGUIClipboard(content.text()); |
| 230 | copying.mime = !content.mime().empty() ? content.mime() : inferMIMEType(content.text()).value_or("text/plain"); |
| 231 | } |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | void syncWithGUIClipboard(bool force) { |
| 236 | using enum ClipboardContentType; |
no test coverage detected