chiark / gitweb /
Add missing call to gtk_selection_clear_targets(), without which the
authorSimon Tatham <anakin@pobox.com>
Mon, 1 Dec 2008 23:04:17 +0000 (23:04 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 1 Dec 2008 23:04:17 +0000 (23:04 +0000)
list of selection targets offered by GTK Puzzles grows an extra copy
of each of the three supported text formats every time the user
makes a selection!

[originally from svn r8365]

gtk.c

diff --git a/gtk.c b/gtk.c
index c17ffe2b76906896737239dc18d7c4df7e46ba3f..5f2ef2294d729f8a96e50179c79ab470c8968586 100644 (file)
--- a/gtk.c
+++ b/gtk.c
@@ -1244,6 +1244,7 @@ void write_clip(frontend *fe, char *data)
 
     if (gtk_selection_owner_set(fe->area, GDK_SELECTION_PRIMARY,
                                CurrentTime)) {
+       gtk_selection_clear_targets(fe->area, GDK_SELECTION_PRIMARY);
        gtk_selection_add_target(fe->area, GDK_SELECTION_PRIMARY,
                                 GDK_SELECTION_TYPE_STRING, 1);
        gtk_selection_add_target(fe->area, GDK_SELECTION_PRIMARY,