Hi,
I'm running CEF in OSR mode on Mac OS X, integrated into an existing SDL application ported from Windows. While testing, I noticed that every now and then, single characters were missing when typing, both when entering text on a CEF-rendered website and within our application (we have our own custom edit fields).
The program is running on a 10ms SDL timer, with CefDoMessageLoopWork() being called 25 times per second. Some debugging showed that, depending on the frequency of CEF updates, the SDL keyboard events (SDL_KEYDOWN) go missing occasionally.
Adding an option to temporarily disable the CefDoMessageLoopWork() call led to no more keystrokes being lost (but of course stopped all the browser windows from responding). Calling 10 times per second resulted in only a small number of missing keystrokes, but poor responsiveness of the browsers, let alone Flash videos. Calling the update in sync with the application - 100 times per second - renders our program pretty unusable, as hardly any key events are being received. There seems to be no connection to the number of running browser windows, and not creating any browser window at all (via CreateBrowserSync) did not change anything.
The original Windows implementation is running the same CEF code, but uses a hand-coded, native message loop (WndProc, WinMain etc) instead of SDL. The problem does not occur on Windows. My initial suspect was SDL, updating from the pretty old version 1.2.15 to 2.0.0 and recently to 2.0.1 did not help either.
So, my questions are: has anyone else heard of this issue or experienced the same effects? Am I doing something wrong, maybe specific to the internals of Mac OS? Could CefDoMessageLoopWork() starve away my input events even though all my OSR browsers actually get their keyboard (and mouse) events injected from the outside? Or maybe is there some additional configuration required in order to stop CEF in connection with OSR browsers from sniffing events?
Summary:
- CEF version used: 3.1547.1412_macosx32
- problem occurs only on Mac OS
- all browsers are running in OSR mode
- keyboard input gets injected into the browsers via SendKeyEvent()
- problem occurs even when no browser windows exist
Thanks a lot,
Werner