summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTingPing <tngpng@gmail.com>2013-06-07 08:20:36 -0300
committerTingPing <tngpng@gmail.com>2013-06-07 08:20:36 -0300
commit0dd9ac2e44c9e9271a9986dfcc73d53d5d6b59ef (patch)
treeb37ff42ae791c4e987ddf086d5807f3195459dfd
parent8f551de4f4560ef27c08e4c20cb12bdd1c0eae2b (diff)
Take two at fixing xtext copying to secondary clipboard
-rw-r--r--src/fe-gtk/xtext.c13
1 files 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