Add missing call to gtk_selection_clear_targets(), without which the
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 1 Dec 2008 23:03:11 +0000 (23:03 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 1 Dec 2008 23:03:11 +0000 (23:03 +0000)
list of selection targets offered by GTK PuTTY/pterm grows an extra
copy of each of the three supported text formats every time the user
makes a selection!

git-svn-id: svn://svn.tartarus.org/sgt/putty@8364 cda61777-01e9-0310-a592-d414129be87e

unix/gtkwin.c

index 6510e26..207bd48 100644 (file)
@@ -1640,6 +1640,7 @@ void write_clip(void *frontend, wchar_t * data, int *attr, int len, int must_des
 
     if (gtk_selection_owner_set(inst->area, GDK_SELECTION_PRIMARY,
                                inst->input_event_time)) {
+       gtk_selection_clear_targets(inst->area, GDK_SELECTION_PRIMARY);
        gtk_selection_add_target(inst->area, GDK_SELECTION_PRIMARY,
                                 GDK_SELECTION_TYPE_STRING, 1);
        if (inst->pasteout_data_ctext)