forked from enlightenment/efl
Ecore_X(cb): Do not use UTF8_STRING as a valid target unless ICONV
support is built in. Fix stefan's segfault wrt terminology pasting. SVN revision: 72526
This commit is contained in:
parent
95fdd837b7
commit
68bf4c2e2e
|
@ -696,8 +696,10 @@ _ecore_xcb_selection_converter_text(char *target,
|
||||||
style = XcbCompoundTextStyle;
|
style = XcbCompoundTextStyle;
|
||||||
else if (!strcmp(target, ECORE_X_SELECTION_TARGET_STRING))
|
else if (!strcmp(target, ECORE_X_SELECTION_TARGET_STRING))
|
||||||
style = XcbStringStyle;
|
style = XcbStringStyle;
|
||||||
|
#ifdef HAVE_ICONV
|
||||||
else if (!strcmp(target, ECORE_X_SELECTION_TARGET_UTF8_STRING))
|
else if (!strcmp(target, ECORE_X_SELECTION_TARGET_UTF8_STRING))
|
||||||
style = XcbUTF8StringStyle;
|
style = XcbUTF8StringStyle;
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
|
|
||||||
|
@ -734,8 +736,6 @@ _ecore_xcb_selection_converter_text(char *target,
|
||||||
#endif
|
#endif
|
||||||
else
|
else
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
|
@ -958,14 +958,8 @@ _ecore_xcb_selection_data_targets_free(void *data)
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
if (!(sel = data)) return 0;
|
if (!(sel = data)) return 0;
|
||||||
if (sel->targets)
|
if (sel->targets) free(sel->targets);
|
||||||
{
|
free(ECORE_XCB_SELECTION_DATA(sel)->data);
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
for (i = 0; i < sel->num_targets; i++)
|
|
||||||
if (sel->targets[i]) free(sel->targets[i]);
|
|
||||||
if (sel->targets) free(sel->targets);
|
|
||||||
}
|
|
||||||
free(sel);
|
free(sel);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue