mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-09-06 18:05:39 +00:00
data-device: Only bail out if we failed to allocate offer
It's valid to have a NULL data source (self-dnd) in which case we send a NULL offer on enter.
This commit is contained in:
parent
ab19f937c2
commit
a34e2f2adc
|
@ -236,11 +236,12 @@ weston_drag_set_focus(struct weston_drag *drag, struct weston_surface *surface,
|
|||
|
||||
serial = wl_display_next_serial(display);
|
||||
|
||||
if (drag->data_source)
|
||||
if (drag->data_source) {
|
||||
offer = weston_data_source_send_offer(drag->data_source,
|
||||
resource);
|
||||
if (offer == NULL)
|
||||
return;
|
||||
}
|
||||
|
||||
wl_data_device_send_enter(resource, serial, surface->resource,
|
||||
sx, sy, offer);
|
||||
|
|
Loading…
Reference in a new issue