forked from enlightenment/efl
Refuse selection request if conversion to target failed or a converter
is not available SVN revision: 8510
This commit is contained in:
parent
1c38ca23ec
commit
5273a7fb41
|
@ -927,17 +927,19 @@ _ecore_x_event_handle_selection_request(XEvent *xevent)
|
||||||
if (_ecore_x_selection_convert(xnotify.selection, xnotify.target,
|
if (_ecore_x_selection_convert(xnotify.selection, xnotify.target,
|
||||||
&data) == -1)
|
&data) == -1)
|
||||||
{
|
{
|
||||||
data = malloc(sd->length);
|
/* Refuse selection, conversion to requested target failed */
|
||||||
memcpy(data, sd->data, sd->length);
|
xnotify.property = None;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* FIXME: This does not properly handle large data transfers */
|
||||||
|
ecore_x_window_prop_property_set(xevent->xselectionrequest.requestor,
|
||||||
|
xevent->xselectionrequest.property,
|
||||||
|
xevent->xselectionrequest.target,
|
||||||
|
8, data, sd->length);
|
||||||
|
xnotify.property = xevent->xselectionrequest.property;
|
||||||
|
free(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: This does not properly handle large data transfers */
|
|
||||||
ecore_x_window_prop_property_set(xevent->xselectionrequest.requestor,
|
|
||||||
xevent->xselectionrequest.property,
|
|
||||||
xevent->xselectionrequest.target,
|
|
||||||
8, data, sd->length);
|
|
||||||
xnotify.property = xevent->xselectionrequest.property;
|
|
||||||
free(data);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue