[gtk+/wayland-selections: 13/15] wayland: Add private API to retrieve the drag window for a drag context



commit ac078f8b0ddc0af302317b442462e1ef773759f4
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Aug 28 14:12:51 2014 +0200

    wayland: Add private API to retrieve the drag window for a drag context
    
    On wayland the DnD surface must be created early when starting the drag
    operation, so offer API for GTK+ to get the GdkWindow used as a DnD
    surface on the drag operation.

 gdk/wayland/gdkdnd-wayland.c      |    9 +++++++++
 gdk/wayland/gdkwaylandselection.h |    4 ++++
 2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/gdk/wayland/gdkdnd-wayland.c b/gdk/wayland/gdkdnd-wayland.c
index f40542b..f516a50 100644
--- a/gdk/wayland/gdkdnd-wayland.c
+++ b/gdk/wayland/gdkdnd-wayland.c
@@ -454,3 +454,12 @@ gdk_wayland_drag_context_undo_grab (GdkDragContext *context)
 
   _gdk_wayland_display_deliver_event (gdk_device_get_display (device), event);
 }
+
+GdkWindow *
+gdk_wayland_drag_context_get_dnd_window (GdkDragContext *context)
+{
+  GdkWaylandDragContext *wayland_context;
+
+  wayland_context = GDK_WAYLAND_DRAG_CONTEXT (context);
+  return wayland_context->dnd_window;
+}
diff --git a/gdk/wayland/gdkwaylandselection.h b/gdk/wayland/gdkwaylandselection.h
index 90474c0..a9d42cc 100644
--- a/gdk/wayland/gdkwaylandselection.h
+++ b/gdk/wayland/gdkwaylandselection.h
@@ -47,6 +47,10 @@ GDK_AVAILABLE_IN_ALL
 void
 gdk_wayland_selection_clear_targets (GdkAtom selection);
 
+#define gdk_wayland_drag_context_get_dnd_window gdk_wayland_drag_context_get_dnd_window_libgtk_only
+GDK_AVAILABLE_IN_ALL
+GdkWindow *
+gdk_wayland_drag_context_get_dnd_window (GdkDragContext *context);
 
 #endif
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]