Account for overlay host Widget in CefWidget::GetForWidget (fixes #3784)
This commit is contained in:
parent
8c6f8dd404
commit
b90f0048da
|
@ -42,6 +42,9 @@ CefWidget* CefWidget::GetForWidget(views::Widget* widget) {
|
||||||
if (auto window = view_util::GetWindowFor(widget)) {
|
if (auto window = view_util::GetWindowFor(widget)) {
|
||||||
if (auto* window_view =
|
if (auto* window_view =
|
||||||
static_cast<CefWindowImpl*>(window.get())->cef_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()) {
|
if (window_view->IsChromeStyle()) {
|
||||||
return static_cast<ChromeBrowserFrame*>(widget);
|
return static_cast<ChromeBrowserFrame*>(widget);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue