ozone/wayland: tabdrag: Support dragging upwards to detach a tab
Wayland clients are only aware of surface-local coordinates and there is no implicit grab during DND sessions. This leads to tab detaching issues in Chrome's tab drag implementation. Such problems may happen when the detachable widget occupies any edge area of the window. In this case specifically, the tab strip is placed at top edge, so dragging a tab all the way up won't detach it into a new browser window as expected. This patch fixes it by dispatching a fake motion event with negative coordinates everytime a wl_data_device::leave is received in attached mode, so higher level UI components get a chance to detect when a widget must be detached, ie: pointer was dragged outside the detachable widget's bounds. R=msisov@igalia.com Bug: 896640 Test: Covered by ozone_unittests Change-Id: I1a9e5e07763634bb879f4040bf0da24ebfefa79d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2362987 Commit-Queue: Nick Yamane <nickdiego@igalia.com> Reviewed-by:Maksim Sisov (GMT+3) <msisov@igalia.com> Cr-Commit-Position: refs/heads/master@{#799567}
Showing
Please register or sign in to comment