[gtk+] wayland: Set the master device on the drop-side GdkDragContext
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Set the master device on the drop-side GdkDragContext
- Date: Fri, 26 Jun 2015 12:39:36 +0000 (UTC)
commit 8509a07a08ca34367f20783384df35074fb77f3e
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Jun 26 14:23:16 2015 +0200
wayland: Set the master device on the drop-side GdkDragContext
And force the ungrab on it, instead of the slave, in the case of
local DnD drop. This avoids confusions on the pointer events spawn
from DnD, as GDK doesn't think anymore those are from a slave device.
Most namely, it fixes the stuck grab when finishing DnD on the
same app it was started from.
gdk/wayland/gdkdevice-wayland.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 1e17c77..d16c92f 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -800,7 +800,7 @@ data_device_drop (void *data,
local_dnd_owner = gdk_selection_owner_get_for_display (device->display, gdk_drag_get_selection
(device->drop_context));
if (local_dnd_owner)
- gdk_wayland_device_unset_grab (device->pointer);
+ gdk_wayland_device_unset_grab (device->master_pointer);
_gdk_wayland_drag_context_emit_event (device->drop_context,
GDK_DROP_START, GDK_CURRENT_TIME);
@@ -1712,7 +1712,7 @@ seat_handle_capabilities (void *data,
device_manager->devices =
g_list_prepend (device_manager->devices, device->pointer);
- device->drop_context = _gdk_wayland_drop_context_new (device->pointer,
+ device->drop_context = _gdk_wayland_drop_context_new (device->master_pointer,
device->data_device);
g_signal_emit_by_name (device_manager, "device-added", device->pointer);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]