fix: drag region offsets in BrowserViews (#28295)

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

View File

@@ -319,8 +319,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];