fix: drag region offsets in BrowserViews (#28268)

This commit is contained in:
Shelley Vohr 2021-03-19 13:22:05 +00:00 committed by GitHub
parent a68d43ce8b
commit 79bcb882ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -317,8 +317,9 @@ void NativeBrowserViewMac::UpdateDraggableRegions(
const auto window_content_view_height = NSHeight(window_content_view.bounds);
for (const auto& rect : drag_exclude_rects) {
const auto x = rect.x() + offset.x();
const auto y = window_content_view_height - rect.bottom() + offset.y();
const auto y = window_content_view_height - (rect.bottom() + offset.y());
const auto exclude_rect = NSMakeRect(x, y, rect.width(), rect.height());
const auto drag_region_view_exclude_rect =
[window_content_view convertRect:exclude_rect toView:drag_region_view];