From b0e53f4fcd6fe84dd4592e2932d53ce452f08187 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Sat, 24 Jan 2026 09:02:25 +0100 Subject: [PATCH] Wayland: use UTF8 text from clipboard when available. --- src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx b/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx index 6fa757306..743daef07 100644 --- a/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx +++ b/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx @@ -294,7 +294,8 @@ static void data_offer_handle_offer(void *data, struct wl_data_offer *offer, } else if (strcmp(mime_type, "text/uri-list") == 0 && !fl_selection_type[1]) { fl_selection_type[1] = Fl::clipboard_plain_text; fl_selection_offer_type = "text/uri-list"; - } else if (strcmp(mime_type, wld_plain_text_clipboard) == 0 && !fl_selection_type[1]) { + } else if (strcmp(mime_type, wld_plain_text_clipboard) == 0 && + (!fl_selection_type[1] || !strcmp(fl_selection_offer_type, "text/plain"))) { fl_selection_type[1] = Fl::clipboard_plain_text; fl_selection_offer_type = wld_plain_text_clipboard; } else if (strcmp(mime_type, "text/plain") == 0 && !fl_selection_type[1]) {