chrome: Improve positioning of dialogs (fixes #3628)

Dialogs will be excluded from regions near the top of the window
that contain overlays, draggable regions or titlebar.
This commit is contained in:
Marshall Greenblatt
2024-01-11 18:32:08 -05:00
parent 0d50d5a8c6
commit 5af6227a6f
16 changed files with 274 additions and 85 deletions

View File

@@ -141,7 +141,7 @@ bool CefBrowserViewImpl::HandleKeyboardEvent(
}
// Give the CefWindowDelegate a chance to handle the event.
if (auto* window_impl = cef_window()) {
if (auto* window_impl = cef_window_impl()) {
CefKeyEvent cef_event;
if (browser_util::GetCefKeyEvent(event, cef_event) &&
window_impl->OnKeyEvent(cef_event)) {
@@ -316,7 +316,11 @@ ChromeBrowserView* CefBrowserViewImpl::chrome_browser_view() const {
return static_cast<ChromeBrowserView*>(root_view());
}
CefWindowImpl* CefBrowserViewImpl::cef_window() const {
CefWindowImpl* CefBrowserViewImpl::cef_window_impl() const {
// Same implementation as GetWindow().
if (!root_view()) {
return nullptr;
}
CefRefPtr<CefWindow> window =
view_util::GetWindowFor(root_view()->GetWidget());
return static_cast<CefWindowImpl*>(window.get());