fix: ensure detached devtools are not always draggable (#29717)
This commit is contained in:
parent
330c3bc136
commit
f71c6c04fd
1 changed files with 8 additions and 6 deletions
|
@ -169,13 +169,12 @@
|
||||||
|
|
||||||
// Switch to new state.
|
// Switch to new state.
|
||||||
devtools_docked_ = docked;
|
devtools_docked_ = docked;
|
||||||
|
auto* inspectable_web_contents =
|
||||||
|
inspectableWebContentsView_->inspectable_web_contents();
|
||||||
|
auto* devToolsWebContents =
|
||||||
|
inspectable_web_contents->GetDevToolsWebContents();
|
||||||
|
auto devToolsView = devToolsWebContents->GetNativeView().GetNativeNSView();
|
||||||
if (!docked) {
|
if (!docked) {
|
||||||
auto* inspectable_web_contents =
|
|
||||||
inspectableWebContentsView_->inspectable_web_contents();
|
|
||||||
auto* devToolsWebContents =
|
|
||||||
inspectable_web_contents->GetDevToolsWebContents();
|
|
||||||
auto devToolsView = devToolsWebContents->GetNativeView().GetNativeNSView();
|
|
||||||
|
|
||||||
auto styleMask = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable |
|
auto styleMask = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable |
|
||||||
NSMiniaturizableWindowMask | NSWindowStyleMaskResizable |
|
NSMiniaturizableWindowMask | NSWindowStyleMaskResizable |
|
||||||
NSTexturedBackgroundWindowMask |
|
NSTexturedBackgroundWindowMask |
|
||||||
|
@ -198,6 +197,9 @@
|
||||||
devToolsView.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
|
devToolsView.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
|
||||||
|
|
||||||
[contentView addSubview:devToolsView];
|
[contentView addSubview:devToolsView];
|
||||||
|
[devToolsView setMouseDownCanMoveWindow:NO];
|
||||||
|
} else {
|
||||||
|
[devToolsView setMouseDownCanMoveWindow:YES];
|
||||||
}
|
}
|
||||||
[self setDevToolsVisible:YES activate:activate];
|
[self setDevToolsVisible:YES activate:activate];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue