mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-21 16:05:02 +02:00
X11: Fix a regression in the previous release that caused pasting from GTK based applications to have extra newlines
Fixes #5528 And let me just re-iterate, GNOME/GTK is developed by morons.
This commit is contained in:
8
glfw/x11_window.c
vendored
8
glfw/x11_window.c
vendored
@@ -2945,10 +2945,16 @@ _glfwPlatformGetClipboard(GLFWClipboardType clipboard_type, const char* mime_typ
|
||||
return;
|
||||
}
|
||||
size_t count = 0;
|
||||
atoms[count++] = atom_for_mime(mime_type).atom;
|
||||
if (strcmp(mime_type, "text/plain") == 0) {
|
||||
// we need to do this because GTK/GNOME is developed by morons
|
||||
// they convert text/plain to DOS line endings
|
||||
// https://gitlab.gnome.org/GNOME/gtk/-/issues/2307
|
||||
atoms[count++] = atom_for_mime("text/plain;charset=utf-8").atom;
|
||||
atoms[count++] = _glfw.x11.UTF8_STRING;
|
||||
atoms[count++] = atom_for_mime("text/plain").atom;
|
||||
atoms[count++] = XA_STRING;
|
||||
} else {
|
||||
atoms[count++] = atom_for_mime(mime_type).atom;
|
||||
}
|
||||
getSelectionString(which, atoms, count, write_data, object, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user