xwayland: Implement wayland-to-X11 DnD

X11 client windows now hook a X11-specific MetaWaylandDragDestFuncs
that converts these into Xdnd* messages, and an additional selection
bridge has been added to take care of XdndSelection, and the data
transfers done through it.

https://bugzilla.gnome.org/show_bug.cgi?id=738312
This commit is contained in:
Carlos Garnacho
2015-04-29 17:44:05 +02:00
parent b449ba942a
commit ccb7833e99
3 changed files with 296 additions and 1 deletions

View File

@ -52,6 +52,7 @@
#include "meta-surface-actor.h"
#include "meta-surface-actor-wayland.h"
#include "meta-xwayland-private.h"
typedef enum
{
@ -751,7 +752,11 @@ sync_reactive (MetaWaylandSurface *surface)
static void
sync_drag_dest_funcs (MetaWaylandSurface *surface)
{
surface->dnd.funcs = meta_wayland_data_device_get_drag_dest_funcs ();
if (surface->window &&
surface->window->client_type == META_WINDOW_CLIENT_TYPE_X11)
surface->dnd.funcs = meta_xwayland_selection_get_drag_dest_funcs ();
else
surface->dnd.funcs = meta_wayland_data_device_get_drag_dest_funcs ();
}
void