refactor: better solution for resizable frameless DCHECK (#33790)
* refactor: better solution for resizable frameless DCHECK * fix: also implement TargetForRectin WinFrameView
This commit is contained in:
parent
192a7fad0d
commit
fb534c927a
4 changed files with 36 additions and 9 deletions
|
@ -112,6 +112,16 @@ void FramelessView::UpdateWindowTitle() {}
|
|||
|
||||
void FramelessView::SizeConstraintsChanged() {}
|
||||
|
||||
views::View* FramelessView::TargetForRect(views::View* root,
|
||||
const gfx::Rect& rect) {
|
||||
CHECK_EQ(root, this);
|
||||
|
||||
if (NonClientHitTest(rect.origin()) != HTCLIENT)
|
||||
return this;
|
||||
|
||||
return NonClientFrameView::TargetForRect(root, rect);
|
||||
}
|
||||
|
||||
gfx::Size FramelessView::CalculatePreferredSize() const {
|
||||
return frame_->non_client_view()
|
||||
->GetWindowBoundsForClientBounds(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue