fix: draggable views on BrowserViews on Windows (#26738)
This commit is contained in:
parent
cdcee04bbe
commit
528b0f0e74
4 changed files with 54 additions and 0 deletions
|
@ -1460,6 +1460,16 @@ views::View* NativeWindowViews::GetContentsView() {
|
|||
bool NativeWindowViews::ShouldDescendIntoChildForEventHandling(
|
||||
gfx::NativeView child,
|
||||
const gfx::Point& location) {
|
||||
// App window should claim mouse events that fall within any BrowserViews'
|
||||
// draggable region.
|
||||
for (auto* view : browser_views()) {
|
||||
auto* native_view = static_cast<NativeBrowserViewViews*>(view);
|
||||
auto* view_draggable_region = native_view->draggable_region();
|
||||
if (view_draggable_region &&
|
||||
view_draggable_region->contains(location.x(), location.y()))
|
||||
return false;
|
||||
}
|
||||
|
||||
// App window should claim mouse events that fall within the draggable region.
|
||||
if (draggable_region() &&
|
||||
draggable_region()->contains(location.x(), location.y()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue