From ebaac70b27608a55dd59f0c045c7148c46a97a2c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 3 Nov 2021 07:00:06 +0530 Subject: [PATCH] Fix #4183 (paste in wyland with mime type text/plain) --- docs/changelog.rst | 3 +++ glfw/wl_window.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 93df6895c..9774fa512 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -127,6 +127,9 @@ To update |kitty|, :doc:`follow the instructions `. - Add support for OSC 777 based desktop notifications +- Wayland: Fix pasting from applications that use a MIME type of "text/plain" + rather than "text/plain;charset=utf-8" not working (:iss:`4183`) + 0.23.1 [2021-08-17] ---------------------- diff --git a/glfw/wl_window.c b/glfw/wl_window.c index d8ce80498..1575b8e8a 100644 --- a/glfw/wl_window.c +++ b/glfw/wl_window.c @@ -1563,7 +1563,7 @@ static void set_offer_mimetype(_GLFWWaylandDataOffer* offer, const char* mime) { if (strcmp(mime, "text/plain;charset=utf-8") == 0) { offer->plain_text_mime = "text/plain;charset=utf-8"; - } else if (!offer->plain_text_mime && strcmp(mime, "text/plain")) { + } else if (!offer->plain_text_mime && strcmp(mime, "text/plain") == 0) { offer->plain_text_mime = "text/plain"; } if (strcmp(mime, clipboard_mime()) == 0) {