From a4ec154c8b2f4075cde73bd50c624e4e32381b9b Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 17 Jun 2024 20:22:53 +0200 Subject: [PATCH] wayland: Add getter for DnD origin surface This private method will be used in later commits. Part-of: --- src/wayland/meta-wayland-data-device.c | 6 ++++++ src/wayland/meta-wayland-data-device.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/wayland/meta-wayland-data-device.c b/src/wayland/meta-wayland-data-device.c index d333a30ad..07bb18d34 100644 --- a/src/wayland/meta-wayland-data-device.c +++ b/src/wayland/meta-wayland-data-device.c @@ -345,6 +345,12 @@ meta_wayland_drag_grab_get_device (MetaWaylandDragGrab *drag_grab, return drag_grab->device; } +MetaWaylandSurface * +meta_wayland_drag_grab_get_origin (MetaWaylandDragGrab *drag_grab) +{ + return drag_grab->drag_origin; +} + static void data_source_update_user_dnd_action (MetaWaylandDataSource *source, ClutterModifierType modifiers) diff --git a/src/wayland/meta-wayland-data-device.h b/src/wayland/meta-wayland-data-device.h index d988d2c56..5478ea3ee 100644 --- a/src/wayland/meta-wayland-data-device.h +++ b/src/wayland/meta-wayland-data-device.h @@ -98,3 +98,5 @@ MetaWaylandSeat * meta_wayland_drag_grab_get_seat (MetaWaylandDragGrab *drag_gra ClutterInputDevice * meta_wayland_drag_grab_get_device (MetaWaylandDragGrab *drag_grab, ClutterEventSequence **sequence); + +MetaWaylandSurface * meta_wayland_drag_grab_get_origin (MetaWaylandDragGrab *drag_grab);