1
0
Fork 0

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
This commit is contained in:
Carlos Garnacho 2015-09-28 14:16:20 +02:00
parent fc0a834abb
commit 6b88420465
2 changed files with 12 additions and 0 deletions

View file

@ -2387,6 +2387,15 @@ meta_wayland_surface_drag_dest_drop (MetaWaylandSurface *surface)
surface->dnd.funcs->drop (data_device, 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 * MetaWindow *
meta_wayland_surface_get_toplevel_window (MetaWaylandSurface *surface) meta_wayland_surface_get_toplevel_window (MetaWaylandSurface *surface)
{ {

View file

@ -128,6 +128,8 @@ struct _MetaWaylandDragDestFuncs
const ClutterEvent *event); const ClutterEvent *event);
void (* drop) (MetaWaylandDataDevice *data_device, void (* drop) (MetaWaylandDataDevice *data_device,
MetaWaylandSurface *surface); MetaWaylandSurface *surface);
void (* update) (MetaWaylandDataDevice *data_device,
MetaWaylandSurface *surface);
}; };
struct _MetaWaylandSurface struct _MetaWaylandSurface
@ -240,6 +242,7 @@ void meta_wayland_surface_drag_dest_motion (MetaWaylandSurface
const ClutterEvent *event); const ClutterEvent *event);
void meta_wayland_surface_drag_dest_focus_out (MetaWaylandSurface *surface); 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_drop (MetaWaylandSurface *surface);
void meta_wayland_surface_drag_dest_update (MetaWaylandSurface *surface);
void meta_wayland_surface_update_outputs (MetaWaylandSurface *surface); void meta_wayland_surface_update_outputs (MetaWaylandSurface *surface);