aboutsummaryrefslogtreecommitdiffstats
path: root/src/data-device.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-05-31 23:26:50 -0400
committerKristian Høgsberg <krh@bitplanet.net>2012-05-31 23:26:50 -0400
commit8f63e8013bba6fea9562339c2ed8b3eb1c8e3138 (patch)
treeca8a783141cd9ba6b90784b487ab989593a5a0a8 /src/data-device.c
parentConvert wl_pointer::axis to fixed (diff)
downloadwayland-8f63e8013bba6fea9562339c2ed8b3eb1c8e3138.tar
wayland-8f63e8013bba6fea9562339c2ed8b3eb1c8e3138.tar.gz
wayland-8f63e8013bba6fea9562339c2ed8b3eb1c8e3138.tar.bz2
wayland-8f63e8013bba6fea9562339c2ed8b3eb1c8e3138.tar.lz
wayland-8f63e8013bba6fea9562339c2ed8b3eb1c8e3138.tar.xz
wayland-8f63e8013bba6fea9562339c2ed8b3eb1c8e3138.tar.zst
wayland-8f63e8013bba6fea9562339c2ed8b3eb1c8e3138.zip
data-device: Only send out NULL selection if we have a resource
If the current keyboard focus client doesn't have a resource for the data_device, don't send out the selection event.
Diffstat (limited to 'src/data-device.c')
-rw-r--r--src/data-device.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/data-device.c b/src/data-device.c
index 60e7578..843fcca 100644
--- a/src/data-device.c
+++ b/src/data-device.c
@@ -356,7 +356,8 @@ destroy_selection_data_source(struct wl_listener *listener, void *data)
if (focus) {
data_device = find_resource(&seat->drag_resource_list,
focus->client);
- wl_data_device_send_selection(data_device, NULL);
+ if (data_device)
+ wl_data_device_send_selection(data_device, NULL);
}
}