xprop: Don't use GDK for reading text properties

This commit is contained in:
Jasper St. Pierre
2014-04-06 17:03:53 -04:00
parent 4752776ebf
commit 840378ae68
3 changed files with 25 additions and 38 deletions

View File

@ -650,38 +650,6 @@ meta_ui_window_should_not_cause_focus (Display *xdisplay,
return FALSE;
}
char*
meta_text_property_to_utf8 (Display *xdisplay,
const XTextProperty *prop)
{
GdkDisplay *display;
char **list;
int count;
char *retval;
list = NULL;
display = gdk_x11_lookup_xdisplay (xdisplay);
count = gdk_text_property_to_utf8_list_for_display (display,
gdk_x11_xatom_to_atom_for_display (display, prop->encoding),
prop->format,
prop->value,
prop->nitems,
&list);
if (count == 0)
retval = NULL;
else
{
retval = list[0];
list[0] = g_strdup (""); /* something to free */
}
g_strfreev (list);
return retval;
}
void
meta_ui_theme_get_frame_borders (MetaUI *ui,
MetaFrameType type,