fix: resizing borders in nondraggable regions (#37016)

* fix: resizing borders in nondraggable regions

* chore: remove frame handling from ShouldDescendIntoChildForEventHandling
This commit is contained in:
Shelley Vohr 2023-01-26 14:04:19 +01:00 committed by GitHub
parent 1486cbdf64
commit 0026fdb78a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 13 deletions

View file

@ -1592,19 +1592,7 @@ 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.
if (NonClientHitTest(location) != HTNOWHERE)
return false;
// And the events on border for dragging resizable frameless window.
if ((!has_frame() || has_client_frame()) && resizable_) {
auto* frame =
static_cast<FramelessView*>(widget()->non_client_view()->frame_view());
return frame->ResizingBorderHitTest(location) == HTNOWHERE;
}
return true;
return NonClientHitTest(location) == HTNOWHERE;
}
views::ClientView* NativeWindowViews::CreateClientView(views::Widget* widget) {