fix: drag region offsets in BrowserViews (#28296)

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
trop[bot]
2021-03-22 10:58:58 +09:00
committed by GitHub
parent c34103d912
commit 508075f870

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];