From 57c569424e34408a856f6a4a9c3ab9053ba7e97d Mon Sep 17 00:00:00 2001 From: dijunkun Date: Tue, 10 Nov 2026 23:27:17 +0800 Subject: [PATCH] [fix] apply remote clipboard writes despite stale cache, refs #150 --- .../src/gui/features/clipboard/clipboard_controller.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/desktop/src/gui/features/clipboard/clipboard_controller.cpp b/apps/desktop/src/gui/features/clipboard/clipboard_controller.cpp index c0aee872..0f0cb92e 100644 --- a/apps/desktop/src/gui/features/clipboard/clipboard_controller.cpp +++ b/apps/desktop/src/gui/features/clipboard/clipboard_controller.cpp @@ -286,9 +286,8 @@ void ClipboardController::ApplyPendingWrite() { } // SDL clipboard functions must run on the thread that initialized SDL. - // Browser writes must also refresh an unchanged baseline: the local OS - // clipboard may have changed since the last poll. - if (!complete && *pending_text == last_text_) return; + // Always apply remote writes: the local OS clipboard may have changed since + // the last poll, even when the received text still matches last_text_. if (!SDL_SetClipboardText(pending_text->c_str())) { LOG_ERROR("Failed to set remote clipboard text: {}", SDL_GetError()); if (complete) complete(false);