Skip to content

Commit

Permalink
Account for overlay host Widget in CefWidget::GetForWidget (fixes #3784)
Browse files Browse the repository at this point in the history
  • Loading branch information
nik-sp authored and magreenblatt committed Sep 16, 2024
1 parent d692f80 commit 4deb487
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libcef/browser/views/widget.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ CefWidget* CefWidget::GetForWidget(views::Widget* widget) {
if (auto window = view_util::GetWindowFor(widget)) {
if (auto* window_view =
static_cast<CefWindowImpl*>(window.get())->cef_window_view()) {
if (auto widget_view = view_util::GetHostView(widget)) {
widget = widget_view->GetWidget();
}
if (window_view->IsChromeStyle()) {
return static_cast<ChromeBrowserFrame*>(widget);
}
Expand Down

0 comments on commit 4deb487

Please sign in to comment.