Fix #4183 (paste in wyland with mime type text/plain)

This commit is contained in:
Kovid Goyal 2021-11-03 07:00:06 +05:30
parent 7c161f2d78
commit ebaac70b27
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 1 deletions

View File

@ -127,6 +127,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
- Add support for OSC 777 based desktop notifications - 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] 0.23.1 [2021-08-17]
---------------------- ----------------------

2
glfw/wl_window.c vendored
View File

@ -1563,7 +1563,7 @@ static void
set_offer_mimetype(_GLFWWaylandDataOffer* offer, const char* mime) { set_offer_mimetype(_GLFWWaylandDataOffer* offer, const char* mime) {
if (strcmp(mime, "text/plain;charset=utf-8") == 0) { if (strcmp(mime, "text/plain;charset=utf-8") == 0) {
offer->plain_text_mime = "text/plain;charset=utf-8"; 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"; offer->plain_text_mime = "text/plain";
} }
if (strcmp(mime, clipboard_mime()) == 0) { if (strcmp(mime, clipboard_mime()) == 0) {