Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Commit

Permalink
fix: NOTREACHED when resizing windows frameless bounds (electron#33029)
Browse files Browse the repository at this point in the history
* fix: NOTREACHED when resizing windows frameless bounds

* fix: scope to window_->IsResizable()
  • Loading branch information
codebytere authored and khalwa committed Feb 22, 2023
1 parent 5b02be2 commit 76b2771
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions shell/browser/ui/views/win_frame_view.cc
Expand Up @@ -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));
Expand Down

0 comments on commit 76b2771

Please sign in to comment.