gnome-terminal insists on receiving the selection as COMPOUND_TEXT
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 13 Oct 2002 23:48:31 +0000 (23:48 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 13 Oct 2002 23:48:31 +0000 (23:48 +0000)
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

index a771543..3f3d08f 100644 (file)
@@ -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;