Refuse selection request if conversion to target failed or a converter

is not available


SVN revision: 8510
This commit is contained in:
xcomputerman 2004-01-17 00:22:32 +00:00 committed by xcomputerman
parent 1c38ca23ec
commit 5273a7fb41
1 changed files with 12 additions and 10 deletions

View File

@ -927,10 +927,11 @@ _ecore_x_event_handle_selection_request(XEvent *xevent)
if (_ecore_x_selection_convert(xnotify.selection, xnotify.target,
&data) == -1)
{
data = malloc(sd->length);
memcpy(data, sd->data, sd->length);
/* Refuse selection, conversion to requested target failed */
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,
@ -939,6 +940,7 @@ _ecore_x_event_handle_selection_request(XEvent *xevent)
xnotify.property = xevent->xselectionrequest.property;
free(data);
}
}
else
{
xnotify.property = None;