[mutter] wayland: Add "update" vfunc to MetaWaylandDragDestFuncs



commit 6b8842046512e711a9625c2695d6db915bd98961
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Sep 28 14:16:20 2015 +0200

    wayland: Add "update" vfunc to MetaWaylandDragDestFuncs
    
    This will be useful when an update is due but no motion event is to be
    sent/received (eg. modifier changes during DnD).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760805

 src/wayland/meta-wayland-surface.c |    9 +++++++++
 src/wayland/meta-wayland-surface.h |    3 +++
 2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 18f8e16..fe89b5b 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -2387,6 +2387,15 @@ meta_wayland_surface_drag_dest_drop (MetaWaylandSurface *surface)
   surface->dnd.funcs->drop (data_device, surface);
 }
 
+void
+meta_wayland_surface_drag_dest_update (MetaWaylandSurface *surface)
+{
+  MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default ();
+  MetaWaylandDataDevice *data_device = &compositor->seat->data_device;
+
+  surface->dnd.funcs->update (data_device, surface);
+}
+
 MetaWindow *
 meta_wayland_surface_get_toplevel_window (MetaWaylandSurface *surface)
 {
diff --git a/src/wayland/meta-wayland-surface.h b/src/wayland/meta-wayland-surface.h
index 94ba100..7a5ec6d 100644
--- a/src/wayland/meta-wayland-surface.h
+++ b/src/wayland/meta-wayland-surface.h
@@ -128,6 +128,8 @@ struct _MetaWaylandDragDestFuncs
                       const ClutterEvent    *event);
   void (* drop)      (MetaWaylandDataDevice *data_device,
                       MetaWaylandSurface    *surface);
+  void (* update)    (MetaWaylandDataDevice *data_device,
+                      MetaWaylandSurface    *surface);
 };
 
 struct _MetaWaylandSurface
@@ -240,6 +242,7 @@ void                meta_wayland_surface_drag_dest_motion    (MetaWaylandSurface
                                                               const ClutterEvent   *event);
 void                meta_wayland_surface_drag_dest_focus_out (MetaWaylandSurface   *surface);
 void                meta_wayland_surface_drag_dest_drop      (MetaWaylandSurface   *surface);
+void                meta_wayland_surface_drag_dest_update    (MetaWaylandSurface   *surface);
 
 void                meta_wayland_surface_update_outputs (MetaWaylandSurface *surface);
 


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