[mutter] data-device: Don't look up the same client twice in two different ways
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] data-device: Don't look up the same client twice in two different ways
- Date: Thu, 10 Jul 2014 17:39:12 +0000 (UTC)
commit 59fa74fed16965f792747fa2bda6ea3b1f8fae87
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Jul 10 10:41:30 2014 -0400
data-device: Don't look up the same client twice in two different ways
src/wayland/meta-wayland-data-device.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/wayland/meta-wayland-data-device.c b/src/wayland/meta-wayland-data-device.c
index 9618d05..7b397db 100644
--- a/src/wayland/meta-wayland-data-device.c
+++ b/src/wayland/meta-wayland-data-device.c
@@ -198,6 +198,7 @@ drag_grab_focus (MetaWaylandPointerGrab *grab,
{
MetaWaylandDragGrab *drag_grab = (MetaWaylandDragGrab*) grab;
MetaWaylandSeat *seat = drag_grab->seat;
+ struct wl_client *client;
struct wl_resource *resource, *offer = NULL;
struct wl_display *display;
guint32 serial;
@@ -221,13 +222,13 @@ drag_grab_focus (MetaWaylandPointerGrab *grab,
wl_resource_get_client (surface->resource) != drag_grab->drag_client)
return;
- resource =
- wl_resource_find_for_client (&seat->data_device_resource_list,
- wl_resource_get_client (surface->resource));
+ client = wl_resource_get_client (surface->resource);
+
+ resource = wl_resource_find_for_client (&seat->data_device_resource_list, client);
if (!resource)
return;
- display = wl_client_get_display (wl_resource_get_client (resource));
+ display = wl_client_get_display (client);
serial = wl_display_next_serial (display);
if (drag_grab->drag_data_source)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]