summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2015-02-17 19:45:50 +0100
committerCarlos Garnacho <carlosg@gnome.org>2015-02-17 19:50:05 +0100
commite43ec48e837b6b458a1b89658ecc19bff9f90265 (patch)
tree7c6f81e6cd6da85c9d1f8660385cae78a60f7137
parent4162fccaa29d2c22ca3050520fa217c4edf3dc72 (diff)
downloadgtk+-e43ec48e837b6b458a1b89658ecc19bff9f90265.tar.gz
wayland: Use display from GdkDragContext device
It will be useless to check the source window on the destination side, it's at the moment always NULL. Fetch the display from the device instead, which will be set for every GdkDragContext.
-rw-r--r--gdk/wayland/gdkdnd-wayland.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdk/wayland/gdkdnd-wayland.c b/gdk/wayland/gdkdnd-wayland.c
index 39914c5a75..f558bb5240 100644
--- a/gdk/wayland/gdkdnd-wayland.c
+++ b/gdk/wayland/gdkdnd-wayland.c
@@ -382,7 +382,11 @@ _gdk_wayland_drop_context_new (GdkDevice *device,
void
gdk_wayland_drop_context_update_targets (GdkDragContext *context)
{
- GdkDisplay *display = gdk_window_get_display (context->source_window);
+ GdkDisplay *display;
+ GdkDevice *device;
+
+ device = gdk_drag_context_get_device (context);
+ display = gdk_device_get_display (device);
g_list_free (context->targets);
context->targets = g_list_copy (gdk_wayland_selection_get_targets (display));
}