Open nik-sp opened 1 month ago
While investigating the failure of ViewsWindowTest.WindowAccelerator, I noticed that the OnKeyEvent function is not triggered. This happens because CefWindowDelegate::OnKeyEvent is not being called as expected.
ViewsWindowTest.WindowAccelerator
CefWindowDelegate::OnKeyEvent
I haven't tested on Linux or Windows, but I expect the issue to be reproducible there as well. It does work on Windows using CefUnhandledKeyEventHandler: https://github.com/chromiumembedded/cef/blob/a231b7ead7e624dc5c2d79bf4c160aed9c8efeb9/libcef/browser/views/window_impl.cc#L59
CefUnhandledKeyEventHandler
Steps to reproduce the issue:
./out/Debug_GN_arm64/ceftests.app/Contents/MacOS/ceftests --use-views --enable-chrome-runtime --gtest_filter=ViewsWindowTest.WindowAccelerator
OnKeyEvent
Alternatively, you can:
cefclient
ViewsWindow::OnKeyEvent
CefWindowDelegate::OnKeyEvent should be triggered whenever a key is pressed: https://github.com/chromiumembedded/cef/blob/a231b7ead7e624dc5c2d79bf4c160aed9c8efeb9/include/views/cef_window_delegate.h#L229-L235
Describe the bug
While investigating the failure of
ViewsWindowTest.WindowAccelerator
, I noticed that the OnKeyEvent function is not triggered. This happens becauseCefWindowDelegate::OnKeyEvent
is not being called as expected.To Reproduce
I haven't tested on Linux or Windows, but I expect the issue to be reproducible there as well.It does work on Windows using
CefUnhandledKeyEventHandler
: https://github.com/chromiumembedded/cef/blob/a231b7ead7e624dc5c2d79bf4c160aed9c8efeb9/libcef/browser/views/window_impl.cc#L59Steps to reproduce the issue:
ViewsWindowTest.WindowAccelerator
unit test:OnKeyEvent
is never called.Alternatively, you can:
cefclient
and set a breakpoint atViewsWindow::OnKeyEvent
: https://github.com/chromiumembedded/cef/blob/a231b7ead7e624dc5c2d79bf4c160aed9c8efeb9/tests/cefclient/browser/views_window.cc#L908OnKeyEvent
is not called.Expected behavior
CefWindowDelegate::OnKeyEvent
should be triggered whenever a key is pressed: https://github.com/chromiumembedded/cef/blob/a231b7ead7e624dc5c2d79bf4c160aed9c8efeb9/include/views/cef_window_delegate.h#L229-L235Versions (please complete the following information):