Handle NULL mime-type in drag::accept request
This commit is contained in:
parent
3bbbd15c65
commit
b571f5db6b
12
compositor.c
12
compositor.c
@ -1166,10 +1166,14 @@ drag_accept(struct wl_client *client,
|
|||||||
* request with a pointer_focus/motion event. */
|
* request with a pointer_focus/motion event. */
|
||||||
drag->target = client;
|
drag->target = client;
|
||||||
|
|
||||||
end = drag->types.data + drag->types.size;
|
if (type == NULL) {
|
||||||
for (p = drag->types.data; p < end; p++)
|
drag->type = NULL;
|
||||||
if (strcmp(*p, type) == 0)
|
} else {
|
||||||
drag->type = *p;
|
end = drag->types.data + drag->types.size;
|
||||||
|
for (p = drag->types.data; p < end; p++)
|
||||||
|
if (strcmp(*p, type) == 0)
|
||||||
|
drag->type = *p;
|
||||||
|
}
|
||||||
|
|
||||||
wl_surface_post_event(drag->source, &drag->base,
|
wl_surface_post_event(drag->source, &drag->base,
|
||||||
WL_DRAG_TARGET, drag->type);
|
WL_DRAG_TARGET, drag->type);
|
||||||
|
Loading…
Reference in New Issue
Block a user