From 0dd9ac2e44c9e9271a9986dfcc73d53d5d6b59ef Mon Sep 17 00:00:00 2001 From: TingPing Date: Fri, 7 Jun 2013 08:20:36 -0300 Subject: Take two at fixing xtext copying to secondary clipboard --- src/fe-gtk/xtext.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c index ae29488a..41fb9fdd 100644 --- a/src/fe-gtk/xtext.c +++ b/src/fe-gtk/xtext.c @@ -71,7 +71,6 @@ #include "fe-gtk.h" #include "xtext.h" #include "fkeys.h" -#include "gtkutil.h" #define charlen(str) g_utf8_skip[*(guchar *)(str)] @@ -2196,15 +2195,15 @@ gtk_xtext_set_clip_owner (GtkWidget * xtext, GdkEventButton * event) if (str) { if (str[0]) - gtkutil_copy_to_clipboard (xtext, NULL, str); + { + gtk_clipboard_set_text (gtk_widget_get_clipboard (xtext, GDK_SELECTION_CLIPBOARD), str, len); + + gtk_selection_owner_set (xtext, GDK_SELECTION_PRIMARY, event ? event->time : GDK_CURRENT_TIME); + gtk_selection_owner_set (xtext, GDK_SELECTION_SECONDARY, event ? event->time : GDK_CURRENT_TIME); + } free (str); } - - if (event) - { - gtk_selection_owner_set (xtext, GDK_SELECTION_PRIMARY, event->time); - } } void -- cgit 1.4.1