🔧 Make work with complex shapes

This commit is contained in:
Felix Rieseberg 2017-08-09 14:49:11 -07:00
parent a55015d63d
commit 7bfece1144
4 changed files with 67 additions and 21 deletions

View file

@ -1753,12 +1753,6 @@ void NativeWindowMac::UpdateDraggableRegionViews(
[webView setMouseDownCanMoveWindow:YES];
}
// Call down to a BrowserView, if it exists, and inform it about the
// draggable areas
if (browser_view_) {
browser_view_->UpdateDraggableRegions(regions);
}
// Remove all ControlRegionViews that are added last time.
// Note that [webView subviews] returns the view's mutable internal array and
// it should be copied to avoid mutating the original array while enumerating
@ -1773,6 +1767,12 @@ void NativeWindowMac::UpdateDraggableRegionViews(
std::vector<gfx::Rect> system_drag_exclude_areas =
CalculateNonDraggableRegions(regions, webViewWidth, webViewHeight);
// Call down to a BrowserView, if it exists, and inform it about the
// draggable areas
if (browser_view_) {
browser_view_->UpdateDraggableRegions(system_drag_exclude_areas);
}
// Create and add a ControlRegionView for each region that needs to be
// excluded from the dragging.
for (std::vector<gfx::Rect>::const_iterator iter =