1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-09 23:28:06 -05:00

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.

[originally from svn r2038]
This commit is contained in:
Simon Tatham 2002-10-13 23:48:31 +00:00
parent bacc5cf102
commit e6d2d5260f

View 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;