wayland: Also cancel XDnD drops with no selected target
This is usually an indication of a failed drop operation if the drop site didn't request any target. Check for this specifically on XDnD button release, so that we can cancel the DnD operation right away. Inspired on a fix from Jonas Ådahl. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3821>
This commit is contained in:
parent
6f2f4c5767
commit
ef3de1e58e
1 changed files with 4 additions and 3 deletions
|
@ -916,9 +916,10 @@ drag_xgrab_release (MetaWaylandEventHandler *handler,
|
||||||
CLUTTER_BUTTON3_MASK |
|
CLUTTER_BUTTON3_MASK |
|
||||||
CLUTTER_BUTTON4_MASK |
|
CLUTTER_BUTTON4_MASK |
|
||||||
CLUTTER_BUTTON5_MASK)) <= 1 &&
|
CLUTTER_BUTTON5_MASK)) <= 1 &&
|
||||||
(!meta_wayland_drag_grab_get_focus (drag_grab) ||
|
((!meta_wayland_drag_grab_get_focus (drag_grab) ||
|
||||||
meta_wayland_data_source_get_current_action (data_source) ==
|
meta_wayland_data_source_get_current_action (data_source) ==
|
||||||
WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE))
|
WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE) ||
|
||||||
|
!meta_wayland_data_source_has_target (data_source)))
|
||||||
meta_xwayland_end_dnd_grab (&seat->data_device, FALSE);
|
meta_xwayland_end_dnd_grab (&seat->data_device, FALSE);
|
||||||
|
|
||||||
return CLUTTER_EVENT_PROPAGATE;
|
return CLUTTER_EVENT_PROPAGATE;
|
||||||
|
|
Loading…
Reference in a new issue