[mutter] data-device: Clean up slightly
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] data-device: Clean up slightly
- Date: Sun, 20 Apr 2014 17:07:53 +0000 (UTC)
commit 02c31ac069ee3c605e465568b5c7f0ea7142a020
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sun Apr 20 11:35:53 2014 -0400
data-device: Clean up slightly
src/wayland/meta-wayland-data-device.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/src/wayland/meta-wayland-data-device.c b/src/wayland/meta-wayland-data-device.c
index 46f9a40..ccd6162 100644
--- a/src/wayland/meta-wayland-data-device.c
+++ b/src/wayland/meta-wayland-data-device.c
@@ -399,16 +399,17 @@ meta_wayland_seat_set_selection (MetaWaylandSeat *seat,
if (focus_client)
{
data_device = wl_resource_find_for_client (&seat->data_device_resource_list, focus_client);
- if (data_device && source)
- {
- offer =
- meta_wayland_data_source_send_offer (seat->selection_data_source,
- data_device);
- wl_data_device_send_selection (data_device, offer);
- }
- else if (data_device)
+ if (data_device)
{
- wl_data_device_send_selection (data_device, NULL);
+ if (seat->selection_data_source)
+ {
+ offer = meta_wayland_data_source_send_offer (seat->selection_data_source, data_device);
+ wl_data_device_send_selection (data_device, offer);
+ }
+ else
+ {
+ wl_data_device_send_selection (data_device, NULL);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]