[gtk+] wayland: Ensure we re-request the target if the fd changes
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Ensure we re-request the target if the fd changes
- Date: Thu, 19 Mar 2015 15:09:17 +0000 (UTC)
commit d5160bb950a736d54cedcd2292af1311e5112c04
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Mar 19 15:54:48 2015 +0100
wayland: Ensure we re-request the target if the fd changes
If we receive wl_data_source.target before .send, the target would already
be cached, but we'd take no action on the new fd.
gdk/wayland/gdkselection-wayland.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gdk/wayland/gdkselection-wayland.c b/gdk/wayland/gdkselection-wayland.c
index 4ba016a..043ca7d 100644
--- a/gdk/wayland/gdkselection-wayland.c
+++ b/gdk/wayland/gdkselection-wayland.c
@@ -558,12 +558,12 @@ gdk_wayland_selection_request_target (GdkWaylandSelection *wayland_selection,
else
return FALSE;
- if (fd >= 0)
- wayland_selection->stored_selection.fd = fd;
-
- if (wayland_selection->source_requested_target == target)
+ if (wayland_selection->stored_selection.fd == fd &&
+ wayland_selection->source_requested_target == target)
return FALSE;
+ wayland_selection->stored_selection.fd = fd;
+
wayland_selection->source_requested_target = target;
if (window && target != GDK_NONE)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]