From dd72dfa3f35403d197c07e9824946de2ea4b6df4 Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 13 Oct 2002 23:48:31 +0000 Subject: [PATCH] gnome-terminal insists on receiving the selection as COMPOUND_TEXT rather than STRING, so we can now supply that too. Pasting both ways between pterm and gnome-terminal now works. git-svn-id: svn://svn.tartarus.org/sgt/putty@2038 cda61777-01e9-0310-a592-d414129be87e --- unix/pterm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/unix/pterm.c b/unix/pterm.c index a7715434..3f3d08fd 100644 --- a/unix/pterm.c +++ b/unix/pterm.c @@ -38,6 +38,7 @@ struct gui_data { int pasteout_data_len; int font_width, font_height; int ignore_sbar; + GdkAtom compound_text_atom; }; static struct gui_data the_inst; @@ -792,6 +793,8 @@ void write_clip(wchar_t * data, int len, int must_deselect) GDK_CURRENT_TIME)) { gtk_selection_add_target(inst->area, GDK_SELECTION_PRIMARY, GDK_SELECTION_TYPE_STRING, 1); + gtk_selection_add_target(inst->area, GDK_SELECTION_PRIMARY, + inst->compound_text_atom, 1); } } @@ -1146,6 +1149,8 @@ int main(int argc, char **argv) inst->font_width = gdk_char_width(inst->fonts[0], ' '); inst->font_height = inst->fonts[0]->ascent + inst->fonts[0]->descent; + inst->compound_text_atom = gdk_atom_intern("COMPOUND_TEXT", FALSE); + init_ucs(); back = &pty_backend; -- 2.11.0