x11: Simplify test
authorBenjamin Otte <otte@redhat.com>
Fri, 15 Jun 2018 06:12:33 +0000 (08:12 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 18 Jun 2018 21:49:52 +0000 (23:49 +0200)
Now that we have gdk_drag_context_get_display(), use it.

gdk/x11/gdkdnd-x11.c

index c7bd72d5b286dbccde24374a689a9d54cd28c9e7..a321cb55d30c3e425d13cca9a2e1b01fd8988258 100644 (file)
@@ -274,8 +274,7 @@ gdk_x11_drag_context_find (GdkDisplay *display,
       context = (GdkDragContext *)tmp_list->data;
       context_x11 = (GdkX11DragContext *)context;
 
-      if ((context->source_surface && gdk_surface_get_display (context->source_surface) != display) ||
-          (context->dest_surface && gdk_surface_get_display (context->dest_surface) != display))
+      if (gdk_drag_context_get_display (context) != display)
         continue;
 
       context_dest_xid = context->dest_surface