d8db6fa9da
This change provides a generic solution for active (key) window tracking that works with both Views-hosted and native windows on MacOS. With this new approach we can now successfully route top menu actions to the currently active window. Prior to this change CEF's Views API was using focus notifications as a proxy for window activation notifications. That doesn't work on MacOS where NSWindow activation (key status) is independent of NSView focus (first responder) status, and changes in activation don't necessarily generate focus notifications (see NativeWidgetMac::OnWindowKeyStatusChanged). To make this work reliably on all platforms we now expose a CefWindowDelegate::OnWindowActivationChanged callback. This change also fixes an uninitialized variable (RootWindowMacImpl::with_extension_) that was causing flaky behavior in RootWindowManager::OnRootWindowActivated. To test: 1. Run `cefclient [--use-views]` 2. Select Popup Window from the Tests menu. Do not explicitly activate the popup window (e.g. don't click on it). 3. Verify that further Tests menu actions go to the popup window. 4. Change activation to a first window by clicking on it. Verify that Test menu actions go to that window. 5. Close the currently active window. Do not explicitly activate the remaining window (e.g. don't click on it). 6. Verify that Test menu actions go to the only remaining window. |
||
---|---|---|
.. | ||
base | ||
cpptoc | ||
ctocpp | ||
sandbox | ||
wrapper | ||
CMakeLists.txt.in | ||
libcef.dll.manifest | ||
libcef.lst | ||
libcef_dll.cc | ||
libcef_dll.rc | ||
libcef_dll2.cc | ||
resource.h | ||
shutdown_checker.cc | ||
shutdown_checker.h | ||
template_util.h | ||
transfer_util.cc | ||
transfer_util.h | ||
wrapper_types.h |