From 41fbe6f0c22e00809fc5617dd270f15ba017f329 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Mon, 4 Nov 2024 14:17:30 -0500 Subject: [PATCH] mac: Fix accelerators in overlay BrowserView (see #3188) CefWindowImpl::CanHandleAccelerators was returning false for accelerators triggered in the overlay BrowserView due to IsWindowKey (called from NativeWidgetMac::IsActive) returning false. View::CanHandleAccelerators, on the other hand, only checks IsActive for Aura (non-MacOS) windows. We therefore delegate to the View implementation for consistent handling. --- libcef/browser/views/window_impl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcef/browser/views/window_impl.cc b/libcef/browser/views/window_impl.cc index 57bb31687..a63b9bf6d 100644 --- a/libcef/browser/views/window_impl.cc +++ b/libcef/browser/views/window_impl.cc @@ -500,8 +500,8 @@ bool CefWindowImpl::AcceleratorPressed(const ui::Accelerator& accelerator) { } bool CefWindowImpl::CanHandleAccelerators() const { - if (delegate() && widget_) { - return widget_->IsActive(); + if (delegate() && widget_ && root_view()) { + return root_view()->CanHandleAccelerators(); } return false; }