mirror of
https://github.com/brl/mutter.git
synced 2025-02-16 13:24:09 +00:00
MetaWaylandDataDevice: Don't set surface offset as anchor offset
Since we are using the surface actor to draw the DND icon, the offset is already accounted for by MetaSurfaceActorWayland, and passing the surface position offset would effectively double the actual offset, causing the icon to be misplaced. This patch always sets the anchor offset to (0, 0) when the icon is a Wayland surface, and lets the surface actor deal with the offsetting. https://bugzilla.gnome.org/show_bug.cgi?id=759222
This commit is contained in:
parent
9b26694bbc
commit
bcdda506e1
@ -915,8 +915,7 @@ meta_wayland_data_device_start_drag (MetaWaylandDataDevice *data
|
||||
drag_grab->drag_start_x,
|
||||
drag_grab->drag_start_y);
|
||||
meta_feedback_actor_set_anchor (META_FEEDBACK_ACTOR (drag_grab->feedback_actor),
|
||||
-drag_grab->drag_surface->offset_x,
|
||||
-drag_grab->drag_surface->offset_y);
|
||||
0, 0);
|
||||
clutter_actor_add_child (drag_grab->feedback_actor,
|
||||
CLUTTER_ACTOR (drag_grab->drag_surface->surface_actor));
|
||||
|
||||
@ -1457,24 +1456,6 @@ meta_wayland_data_device_is_dnd_surface (MetaWaylandDataDevice *data_device,
|
||||
data_device->current_grab->drag_surface == surface;
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_data_device_update_dnd_surface (MetaWaylandDataDevice *data_device)
|
||||
{
|
||||
MetaWaylandDragGrab *drag_grab;
|
||||
|
||||
if (!data_device->current_grab)
|
||||
return;
|
||||
|
||||
drag_grab = data_device->current_grab;
|
||||
|
||||
if (!drag_grab->feedback_actor || !drag_grab->drag_surface)
|
||||
return;
|
||||
|
||||
meta_feedback_actor_set_anchor (META_FEEDBACK_ACTOR (drag_grab->feedback_actor),
|
||||
-drag_grab->drag_surface->offset_x,
|
||||
-drag_grab->drag_surface->offset_y);
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_wayland_data_source_has_mime_type (const MetaWaylandDataSource *source,
|
||||
const gchar *mime_type)
|
||||
|
@ -74,7 +74,6 @@ void meta_wayland_data_device_set_keyboard_focus (MetaWaylandDataDevice *data_de
|
||||
|
||||
gboolean meta_wayland_data_device_is_dnd_surface (MetaWaylandDataDevice *data_device,
|
||||
MetaWaylandSurface *surface);
|
||||
void meta_wayland_data_device_update_dnd_surface (MetaWaylandDataDevice *data_device);
|
||||
|
||||
void meta_wayland_data_device_set_dnd_source (MetaWaylandDataDevice *data_device,
|
||||
MetaWaylandDataSource *source);
|
||||
|
@ -257,8 +257,6 @@ dnd_surface_commit (MetaWaylandSurfaceRole *surface_role,
|
||||
meta_wayland_surface_role_get_surface (surface_role);
|
||||
|
||||
meta_wayland_surface_queue_pending_state_frame_callbacks (surface, pending);
|
||||
|
||||
meta_wayland_data_device_update_dnd_surface (&surface->compositor->seat->data_device);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
x
Reference in New Issue
Block a user