mac: Call setMouseDownCanMoveWindow in BrowserWindow

This commit is contained in:
Cheng Zhao 2018-03-06 14:07:06 +09:00
parent 7d4ff3b061
commit bc34ca9e25
5 changed files with 52 additions and 17 deletions

View file

@ -736,10 +736,6 @@ enum {
@end
@interface NSView (WebContentsView)
- (void)setMouseDownCanMoveWindow:(BOOL)can_move;
@end
@interface AtomProgressBar : NSProgressIndicator
@end
@ -1765,9 +1761,6 @@ gfx::Rect NativeWindowMac::WindowBoundsToContentBounds(
void NativeWindowMac::UpdateDraggableRegions(
const std::vector<DraggableRegion>& regions) {
if (has_frame())
return;
// All ControlRegionViews should be added as children of the WebContentsView,
// because WebContentsView will be removed and re-added when entering and
// leaving fullscreen mode.
@ -1775,10 +1768,6 @@ void NativeWindowMac::UpdateDraggableRegions(
NSInteger webViewWidth = NSWidth([webView bounds]);
NSInteger webViewHeight = NSHeight([webView bounds]);
if ([webView respondsToSelector:@selector(setMouseDownCanMoveWindow:)]) {
[webView setMouseDownCanMoveWindow:YES];
}
// 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