fix: NOTREACHED when resizing windows frameless bounds (#33029)

* fix: NOTREACHED when resizing windows frameless bounds

* fix: scope to window_->IsResizable()
This commit is contained in:
Shelley Vohr 2022-03-22 00:30:05 +01:00 committed by GitHub
parent 2205d725f2
commit 59246a4c7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,6 +34,14 @@ void WinFrameView::Init(NativeWindowViews* window, views::Widget* frame) {
window_ = window;
frame_ = frame;
// Prevent events from trickling down the views hierarchy here, since
// when a given resizable window is frameless we only want to use
// FramelessView's ResizingBorderHitTest in
// ShouldDescendIntoChildForEventHandling. See
// https://chromium-review.googlesource.com/c/chromium/src/+/3251980.
if (!window_->has_frame() && window_->IsResizable())
frame_->client_view()->SetCanProcessEventsWithinSubtree(false);
if (window->IsWindowControlsOverlayEnabled()) {
caption_button_container_ =
AddChildView(std::make_unique<WinCaptionButtonContainer>(this));