mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: drag region offsets in BrowserViews (#28295)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
@@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user