[PATCH] compositor: shell: register wl_drag_offer as a global object list

Tiago Vignatti tiago.vignatti at intel.com
Mon Aug 1 07:38:34 PDT 2011


dnd client is back in the business now.

Signed-off-by: Tiago Vignatti <tiago.vignatti at intel.com>
---
I guess krh is re-working this interface, but the patch is here for someone
that wants to play with.

 compositor/shell.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/compositor/shell.c b/compositor/shell.c
index 91af256..d93b9c3 100644
--- a/compositor/shell.c
+++ b/compositor/shell.c
@@ -506,6 +506,8 @@ drag_activate(struct wl_client *client,
 		(void (**)(void)) &drag_offer_interface;
 
 	wl_display_add_object(display, &drag->drag_offer.object);
+	if (wl_display_add_global(display, &drag->drag_offer.object, NULL))
+		return;
 
 	target = pick_surface(device, &sx, &sy);
 	wl_input_device_set_pointer_focus(device, NULL, time, 0, 0, 0, 0);
-- 
1.7.2.2



More information about the wayland-devel mailing list