summaryrefslogtreecommitdiff
path: root/gtk/gtkselection.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2010-12-16 23:44:50 -0500
committerMatthias Clasen <mclasen@redhat.com>2010-12-21 12:07:03 -0500
commit572bb200113dd8e3bec7bc0ff37bb7d6497fad71 (patch)
treeb110ccf95b74e097867d76c8bcf954c28658e847 /gtk/gtkselection.c
parent61104d58ea4fbc63ba273770a4e85152dc08addb (diff)
downloadgtk+-572bb200113dd8e3bec7bc0ff37bb7d6497fad71.tar.gz
Deal with property encoding functions
Move everything dealing with compound text to be X11 specific Only gdk_text_property_to_utf8_list and gdk_utf8_to_string_target are kept across backends, so add vfuncs for these. Also, remove the non-multihead-safe variants of all these.
Diffstat (limited to 'gtk/gtkselection.c')
-rw-r--r--gtk/gtkselection.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c
index 043d8ed71d..eebd8d609f 100644
--- a/gtk/gtkselection.c
+++ b/gtk/gtkselection.c
@@ -1318,18 +1318,22 @@ selection_set_compound_text (GtkSelectionData *selection_data,
gint format;
gint new_length;
gboolean result = FALSE;
-
- tmp = g_strndup (str, len);
- if (gdk_utf8_to_compound_text_for_display (selection_data->display, tmp,
- &encoding, &format, &text, &new_length))
+
+#ifdef GDK_WINDOWING_X11
+ if (GDK_IS_DISPLAY_X11 (selection_data->display))
{
- gtk_selection_data_set (selection_data, encoding, format, text, new_length);
- gdk_free_compound_text (text);
-
- result = TRUE;
- }
+ tmp = g_strndup (str, len);
+ if (gdk_x11_display_utf8_to_compound_text (selection_data->display, tmp,
+ &encoding, &format, &text, &new_length))
+ {
+ gtk_selection_data_set (selection_data, encoding, format, text, new_length);
+ gdk_x11_free_compound_text (text);
- g_free (tmp);
+ result = TRUE;
+ }
+ g_free (tmp);
+ }
+#endif
return result;
}