wayland: Redirect the focus explicitly to the Xdnd drag source
We were relying on the drag source surface to keep receiving events thanks to it being implicitly grabbed by the button press. This broke at some point, making the Xdnd drag source unable to keep directing the DnD operation as it is expected by X11 clients. To fix this, make the Xdnd MetaWaylandEventInterface stick itself to the drag source surface keeping the focus of the device driving the DnD operation, so that the X11 client can still handle events from it. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3511 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3821>
This commit is contained in:
parent
a4ec154c8b
commit
fd1d8c778b
1 changed files with 8 additions and 7 deletions
|
@ -843,16 +843,17 @@ drag_xgrab_get_focus_surface (MetaWaylandEventHandler *handler,
|
|||
ClutterEventSequence *sequence,
|
||||
gpointer user_data)
|
||||
{
|
||||
ClutterSeat *clutter_seat;
|
||||
MetaWaylandDragGrab *drag_grab = user_data;
|
||||
ClutterInputDevice *drag_device;
|
||||
ClutterEventSequence *drag_sequence;
|
||||
|
||||
clutter_seat = clutter_input_device_get_seat (device);
|
||||
if (sequence ||
|
||||
device != clutter_seat_get_pointer (clutter_seat))
|
||||
drag_device = meta_wayland_drag_grab_get_device (drag_grab, &drag_sequence);
|
||||
|
||||
if (drag_sequence != sequence ||
|
||||
drag_device != device)
|
||||
return NULL;
|
||||
|
||||
return meta_wayland_event_handler_chain_up_get_focus_surface (handler,
|
||||
device,
|
||||
sequence);
|
||||
return meta_wayland_drag_grab_get_origin (drag_grab);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue