data-device: Don't look up the same client twice in two different ways
This commit is contained in:
parent
581335fbea
commit
59fa74fed1
@ -198,6 +198,7 @@ drag_grab_focus (MetaWaylandPointerGrab *grab,
|
|||||||
{
|
{
|
||||||
MetaWaylandDragGrab *drag_grab = (MetaWaylandDragGrab*) grab;
|
MetaWaylandDragGrab *drag_grab = (MetaWaylandDragGrab*) grab;
|
||||||
MetaWaylandSeat *seat = drag_grab->seat;
|
MetaWaylandSeat *seat = drag_grab->seat;
|
||||||
|
struct wl_client *client;
|
||||||
struct wl_resource *resource, *offer = NULL;
|
struct wl_resource *resource, *offer = NULL;
|
||||||
struct wl_display *display;
|
struct wl_display *display;
|
||||||
guint32 serial;
|
guint32 serial;
|
||||||
@ -221,13 +222,13 @@ drag_grab_focus (MetaWaylandPointerGrab *grab,
|
|||||||
wl_resource_get_client (surface->resource) != drag_grab->drag_client)
|
wl_resource_get_client (surface->resource) != drag_grab->drag_client)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
resource =
|
client = wl_resource_get_client (surface->resource);
|
||||||
wl_resource_find_for_client (&seat->data_device_resource_list,
|
|
||||||
wl_resource_get_client (surface->resource));
|
resource = wl_resource_find_for_client (&seat->data_device_resource_list, client);
|
||||||
if (!resource)
|
if (!resource)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
display = wl_client_get_display (wl_resource_get_client (resource));
|
display = wl_client_get_display (client);
|
||||||
serial = wl_display_next_serial (display);
|
serial = wl_display_next_serial (display);
|
||||||
|
|
||||||
if (drag_grab->drag_data_source)
|
if (drag_grab->drag_data_source)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user